debug change-password better

This commit is contained in:
the-djmaze 2022-05-05 16:49:19 +02:00
parent acac16cef0
commit ffafc2313d
2 changed files with 23 additions and 27 deletions

View file

@ -107,6 +107,7 @@ class ChangePasswordDriverPDO
}
catch (\Exception $oException)
{
\SnappyMail\Log::error('change-password', $oException->getMessage());
if ($this->oLogger) {
$this->oLogger->WriteException($oException);
}

View file

@ -63,9 +63,28 @@
} else {
this.reset(true);
rl.pluginRemoteRequest(
(...args) => {
console.dir(...args);
this.onChangePasswordResponse(...args);
(iError, data) {
this.reset(false);
if (iError) {
this.passwordUpdateError(true);
if (131 === iError) {
// Notification.CurrentPasswordIncorrect
this.currentPasswordError(true);
}
this.errorDescription((data && rl.i18n(data.ErrorMessageAdditional))
|| rl.i18n('NOTIFICATIONS/COULD_NOT_SAVE_NEW_PASSWORD'));
} else {
this.currentPassword('');
this.newPassword('');
this.newPassword2('');
this.passwordUpdateSuccess(true);
/*
const refresh = rl.app.refresh;
rl.app.refresh = ()=>{};
rl.setData(data.Result);
rl.app.refresh = refresh;
*/
}
},
'ChangePassword',
{
@ -101,30 +120,6 @@
this.newPassword('');
this.newPassword2('');
}
onChangePasswordResponse(iError, data) {
this.reset(false);
if (iError) {
this.passwordUpdateError(true);
if (131 === iError) {
// Notification.CurrentPasswordIncorrect
this.currentPasswordError(true);
}
this.errorDescription((data && rl.i18n(data.ErrorMessageAdditional))
|| rl.i18n('NOTIFICATIONS/COULD_NOT_SAVE_NEW_PASSWORD'));
} else {
this.currentPassword('');
this.newPassword('');
this.newPassword2('');
this.passwordUpdateSuccess(true);
/*
const refresh = rl.app.refresh;
rl.app.refresh = ()=>{};
rl.setData(data.Result);
rl.app.refresh = refresh;
*/
}
}
}
rl.addSettingsViewModel(