Clears session on password change

- Fixes error type when passing an invalid session token
This commit is contained in:
Florent Vilmart
2016-02-15 10:12:53 -05:00
parent cf7202f80a
commit ea07eb506d
3 changed files with 7 additions and 7 deletions

View File

@@ -306,7 +306,7 @@ RestWrite.prototype.transformUser = function() {
if (!this.data.password) {
return;
}
if (this.query) {
if (this.query && !this.auth.isMaster ) {
this.storage['clearSessions'] = true;
}
return passwordCrypto.hash(this.data.password).then((hashedPassword) => {