From cac50bfdf296042b7fc6d608c1b7c811c4546513 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 8 Jun 2010 13:15:03 -0600 Subject: [PATCH] Move passwordChangeRequested() to horde/Core --- framework/Auth/lib/Horde/Auth.php | 10 ---------- framework/Core/lib/Horde/Registry.php | 10 ++++++++++ horde/login.php | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/framework/Auth/lib/Horde/Auth.php b/framework/Auth/lib/Horde/Auth.php index 287f8579e..f58e6d151 100644 --- a/framework/Auth/lib/Horde/Auth.php +++ b/framework/Auth/lib/Horde/Auth.php @@ -354,16 +354,6 @@ class Horde_Auth } /** - * Return whether the authentication backend requested a password change. - * - * @return boolean Whether the backend requested a password change. - */ - static public function passwordChangeRequested() - { - return !empty($_SESSION['horde_auth']['change']); - } - - /** * Returns the requested credential for the currently logged in user, if * present. * diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index d24f138fe..2f7dbbeee 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -1869,4 +1869,14 @@ class Horde_Registry } } + /** + * Return whether the authentication backend requested a password change. + * + * @return boolean Whether the backend requested a password change. + */ + public function passwordChangeRequested() + { + return !empty($_SESSION['horde_auth']['change']); + } + } diff --git a/horde/login.php b/horde/login.php index 8678685cc..163aea702 100644 --- a/horde/login.php +++ b/horde/login.php @@ -206,7 +206,7 @@ if ($error_reason) { } /* Do password change request on initial login only. */ - if (!$is_auth && Horde_Auth::passwordChangeRequested()) { + if (!$is_auth && $registry->passwordChangeRequested()) { $notification->push(_("Your password has expired."), 'horde.message'); if ($auth->hasCapability('update')) { -- 2.11.0