mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
little things
This commit is contained in:
parent
53ebc4be4c
commit
2a3677f767
@ -42,10 +42,12 @@ Poco::JSON::Object* JsonResetPassword::handle(Poco::Dynamic::Var params)
|
||||
return stateError("password encryption is already running");
|
||||
}
|
||||
|
||||
user->setNewPassword(password);
|
||||
KeyPairEd25519* key_pair = NULL;
|
||||
if (!user->tryLoadPassphraseUserBackup(&key_pair)) {
|
||||
user->setGradidoKeyPair(key_pair);
|
||||
auto update_password_result = user->setNewPassword(password);
|
||||
if (update_password_result == 2) {
|
||||
KeyPairEd25519* key_pair = NULL;
|
||||
if (!user->tryLoadPassphraseUserBackup(&key_pair)) {
|
||||
user->setGradidoKeyPair(key_pair);
|
||||
}
|
||||
}
|
||||
return stateSuccess();
|
||||
}
|
||||
@ -171,8 +171,10 @@ Poco::JSON::Object* JsonUpdateUserInfos::handle(Poco::Dynamic::Var params)
|
||||
|
||||
if (str_val.size() > 0)
|
||||
{
|
||||
|
||||
if (!user->hasPassword() || isOldPasswordValid(updates, jsonErrorsArray))
|
||||
if (!user->hasPassword()) {
|
||||
return stateError("login state invalid");
|
||||
}
|
||||
if (isOldPasswordValid(updates, jsonErrorsArray))
|
||||
{
|
||||
NotificationList errors;
|
||||
if (!sm->checkPwdValidation(value.toString(), &errors, LanguageManager::getInstance()->getFreeCatalog(LANG_EN))) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user