mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 07:35:55 +08:00
Also perform logout if explicit creds change
This commit is contained in:
parent
ae74f21242
commit
50265b3b37
|
@ -119,12 +119,21 @@ class FetchController extends Controller {
|
|||
]);
|
||||
}
|
||||
|
||||
// Logout as the credentials have changed
|
||||
SnappyMailHelper::loadApp();
|
||||
\RainLoop\Api::Actions()->DoLogout();
|
||||
|
||||
return new JSONResponse([
|
||||
'status' => 'success',
|
||||
'Message' => $this->l->t('Saved successfully'),
|
||||
'Email' => $sEmail
|
||||
]);
|
||||
} catch (Exception $e) {
|
||||
// Logout as the credentials might have changed, as exception could be in one attribute
|
||||
// TODO: Handle both exceptions separately?
|
||||
SnappyMailHelper::loadApp();
|
||||
\RainLoop\Api::Actions()->DoLogout();
|
||||
|
||||
return new JSONResponse([
|
||||
'status' => 'error',
|
||||
'Message' => $e->getMessage()
|
||||
|
|
Loading…
Reference in a new issue