mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel
This commit is contained in:
commit
931f10a402
|
@ -107,6 +107,10 @@ function post_api_user (req, res) {
|
|||
}
|
||||
|
||||
var doc = users.save(user, json.passwd, json.active, json.extra, json.changePassword);
|
||||
|
||||
if (json.passwordToken) {
|
||||
users.setPasswordToken(user, json.passwordToken);
|
||||
}
|
||||
users.reload();
|
||||
|
||||
actions.resultOk(req, res, actions.HTTP_CREATED, doc);
|
||||
|
|
|
@ -457,7 +457,7 @@ exports.changePassword = function (token, password) {
|
|||
|
||||
var hash = encodePassword(password);
|
||||
|
||||
users.update(current, { passwordToken: null, password: hash });
|
||||
users.update(current, { passwordToken: null, password: hash, changePassword: false });
|
||||
exports.reload();
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue