Skip to content

Commit b51f16e

Browse files
author
Suvajit Gupta
committed
made user add script specify createdAt
1 parent 63e87de commit b51f16e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

user-add.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,11 @@ if [ $? -ne 0 ]; then
7070
fi
7171

7272
PASSWORD_HASH=`/bin/echo -n $PASSWORD | $SHA1_BIN | awk '{print $1}'`
73+
# Generate timestamp
74+
MILLISECONDS=`/bin/date +%s`000
7375

7476
# Build the JSON and POST to the server using cURL.
75-
JSON="{name:'$FULL_NAME',loginName:'$LOGIN_NAME',role:'_$ROLE',password:'$PASSWORD_HASH'}"
77+
JSON="{name:'$FULL_NAME',loginName:'$LOGIN_NAME',role:'_$ROLE',password:'$PASSWORD_HASH',createdAt:$MILLISECONDS}"
7678

7779
/bin/echo -n "Creating new user... "
7880

0 commit comments

Comments
 (0)