diff options
Diffstat (limited to 'plugins/Login')
-rw-r--r-- | plugins/Login/Controller.php | 5 | ||||
-rw-r--r-- | plugins/Login/Login.php | 3 | ||||
-rwxr-xr-x | plugins/Login/templates/resetPassword.twig | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/plugins/Login/Controller.php b/plugins/Login/Controller.php index 013658b419..28aa0e285c 100644 --- a/plugins/Login/Controller.php +++ b/plugins/Login/Controller.php @@ -10,6 +10,7 @@ */ use Piwik\Config; use Piwik\Piwik; +use Piwik\Common; require_once PIWIK_INCLUDE_PATH . '/core/Config.php'; @@ -315,7 +316,7 @@ class Piwik_Login_Controller extends Piwik_Controller if (is_null($errorMessage)) // if success, show login w/ success message { - $this->redirectToIndex('Login', 'resetPasswordSuccess'); + return $this->redirectToIndex('Login', 'resetPasswordSuccess'); } else { // show login page w/ error. this will keep the token in the URL return $this->login($errorMessage); @@ -392,7 +393,7 @@ class Piwik_Login_Controller extends Piwik_Controller /** * Generate a password reset token. Expires in (roughly) 24 hours. * - * @param array user information + * @param array $user user information * @param int $timestamp Unix timestamp * @return string generated token */ diff --git a/plugins/Login/Login.php b/plugins/Login/Login.php index a46bf6e387..7208328074 100644 --- a/plugins/Login/Login.php +++ b/plugins/Login/Login.php @@ -10,12 +10,13 @@ */ use Piwik\Config; use Piwik\Piwik; +use Piwik\Plugin; /** * * @package Piwik_Login */ -class Piwik_Login extends Piwik_Plugin +class Piwik_Login extends Plugin { /** * @see Piwik_Plugin::getListHooksRegistered diff --git a/plugins/Login/templates/resetPassword.twig b/plugins/Login/templates/resetPassword.twig index eaa5be0a8d..bd9cf4accc 100755 --- a/plugins/Login/templates/resetPassword.twig +++ b/plugins/Login/templates/resetPassword.twig @@ -1,8 +1,8 @@ -{% if infoMessage is defined %} +{% if infoMessage is defined and infoMessage is not empty %} <p class="message">{{ infoMessage }}</p> {% endif %} {% if formErrors is defined %} - <p id="login_error"> + <p class="message_error"> {% for data in formErrors %} <strong>{{ 'General_Error'|translate }}</strong> : {{ data }} |