users: rename createdAt to creationTime
This commit is contained in:
@@ -154,7 +154,7 @@ function create(username, password, email, displayName, options, auditSource, ca
|
||||
const source = options.source || ''; // empty is local user
|
||||
const role = options.role || exports.ROLE_USER;
|
||||
|
||||
var error;
|
||||
let error;
|
||||
|
||||
if (username !== null) {
|
||||
username = username.toLowerCase();
|
||||
@@ -185,15 +185,13 @@ function create(username, password, email, displayName, options, auditSource, ca
|
||||
crypto.pbkdf2(password, salt, CRYPTO_ITERATIONS, CRYPTO_KEY_LENGTH, CRYPTO_DIGEST, function (error, derivedKey) {
|
||||
if (error) return callback(new BoxError(BoxError.CRYPTO_ERROR, error));
|
||||
|
||||
var now = (new Date()).toISOString();
|
||||
var user = {
|
||||
const user = {
|
||||
id: 'uid-' + uuid.v4(),
|
||||
username: username,
|
||||
email: email,
|
||||
fallbackEmail: email,
|
||||
password: Buffer.from(derivedKey, 'binary').toString('hex'),
|
||||
salt: salt.toString('hex'),
|
||||
createdAt: now,
|
||||
resetToken: '',
|
||||
displayName: displayName,
|
||||
source: source,
|
||||
|
||||
Reference in New Issue
Block a user