mirror of
https://github.com/IT4Change/gradido.git
synced 2026-04-06 01:25:28 +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");
|
return stateError("password encryption is already running");
|
||||||
}
|
}
|
||||||
|
|
||||||
user->setNewPassword(password);
|
auto update_password_result = user->setNewPassword(password);
|
||||||
KeyPairEd25519* key_pair = NULL;
|
if (update_password_result == 2) {
|
||||||
if (!user->tryLoadPassphraseUserBackup(&key_pair)) {
|
KeyPairEd25519* key_pair = NULL;
|
||||||
user->setGradidoKeyPair(key_pair);
|
if (!user->tryLoadPassphraseUserBackup(&key_pair)) {
|
||||||
|
user->setGradidoKeyPair(key_pair);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return stateSuccess();
|
return stateSuccess();
|
||||||
}
|
}
|
||||||
@ -171,8 +171,10 @@ Poco::JSON::Object* JsonUpdateUserInfos::handle(Poco::Dynamic::Var params)
|
|||||||
|
|
||||||
if (str_val.size() > 0)
|
if (str_val.size() > 0)
|
||||||
{
|
{
|
||||||
|
if (!user->hasPassword()) {
|
||||||
if (!user->hasPassword() || isOldPasswordValid(updates, jsonErrorsArray))
|
return stateError("login state invalid");
|
||||||
|
}
|
||||||
|
if (isOldPasswordValid(updates, jsonErrorsArray))
|
||||||
{
|
{
|
||||||
NotificationList errors;
|
NotificationList errors;
|
||||||
if (!sm->checkPwdValidation(value.toString(), &errors, LanguageManager::getInstance()->getFreeCatalog(LANG_EN))) {
|
if (!sm->checkPwdValidation(value.toString(), &errors, LanguageManager::getInstance()->getFreeCatalog(LANG_EN))) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user