diff options
author | diosmosis <benaka@piwik.pro> | 2014-09-27 15:21:09 +0400 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2014-09-27 15:21:09 +0400 |
commit | 451f0aab81f7ab8c879ae3dd0adab2e75ffe6ba6 (patch) | |
tree | b32e975765c3d967e0025a0c857e440f6ec28ff3 /plugins/Login/Controller.php | |
parent | e9845a4451a2dfaf599c9b8fce405aa17ec3575c (diff) |
Fixing Login UI Tests.
Diffstat (limited to 'plugins/Login/Controller.php')
-rw-r--r-- | plugins/Login/Controller.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/Login/Controller.php b/plugins/Login/Controller.php index eefec32a90..525e98a555 100644 --- a/plugins/Login/Controller.php +++ b/plugins/Login/Controller.php @@ -260,7 +260,12 @@ class Controller extends \Piwik\Plugin\Controller } if (is_null($errorMessage)) { // if success, show login w/ success message - $this->redirectToIndex(Piwik::getLoginPluginName(), 'resetPasswordSuccess'); + // have to do this as super user since redirectToIndex checks if there's a default website ID for + // the current user and if not, doesn't redirect to the requested action. TODO: this behavior is wrong. somehow. + $self = $this; + Piwik::doAsSuperUser(function () use ($self) { + $self->redirectToIndex(Piwik::getLoginPluginName(), 'resetPasswordSuccess'); + }); return null; } else { // show login page w/ error. this will keep the token in the URL |