mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
debug change-password better
This commit is contained in:
parent
acac16cef0
commit
ffafc2313d
2 changed files with 23 additions and 27 deletions
|
|
@ -107,6 +107,7 @@ class ChangePasswordDriverPDO
|
||||||
}
|
}
|
||||||
catch (\Exception $oException)
|
catch (\Exception $oException)
|
||||||
{
|
{
|
||||||
|
\SnappyMail\Log::error('change-password', $oException->getMessage());
|
||||||
if ($this->oLogger) {
|
if ($this->oLogger) {
|
||||||
$this->oLogger->WriteException($oException);
|
$this->oLogger->WriteException($oException);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,9 +63,28 @@
|
||||||
} else {
|
} else {
|
||||||
this.reset(true);
|
this.reset(true);
|
||||||
rl.pluginRemoteRequest(
|
rl.pluginRemoteRequest(
|
||||||
(...args) => {
|
(iError, data) {
|
||||||
console.dir(...args);
|
this.reset(false);
|
||||||
this.onChangePasswordResponse(...args);
|
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',
|
'ChangePassword',
|
||||||
{
|
{
|
||||||
|
|
@ -101,30 +120,6 @@
|
||||||
this.newPassword('');
|
this.newPassword('');
|
||||||
this.newPassword2('');
|
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(
|
rl.addSettingsViewModel(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue