1
0
Fork 0

Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel

This commit is contained in:
scottashton 2014-04-17 14:12:24 +02:00
commit 931f10a402
2 changed files with 5 additions and 1 deletions

View File

@ -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);

View File

@ -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;