mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-10 09:02:45 +08: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)
|
||||
{
|
||||
\SnappyMail\Log::error('change-password', $oException->getMessage());
|
||||
if ($this->oLogger) {
|
||||
$this->oLogger->WriteException($oException);
|
||||
}
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue