aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2013-03-06 08:56:04 +0000
committerplegall <plg@piwigo.org>2013-03-06 08:56:04 +0000
commitb9db72e19861099f7369e4986821b5f4c1d75ec1 (patch)
tree9690ed19f3c4a8a3643c437074647951d0f00dcc
parent93cfb5208128956d9527bdab7fd3a22afa674e22 (diff)
bug 2861: avoid "invalid password" with manual upgrade and admin session expired
git-svn-id: http://piwigo.org/svn/branches/2.5@21236 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_user.inc.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index d6250c582..4f92b7d3d 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -1154,8 +1154,13 @@ function pwg_password_verify($password, $hash, $user_id=null)
$check = ($hash == md5($password));
}
- if ($check and isset($user_id) and !$conf['external_authentification'])
+ if ($check)
{
+ if (!isset($user_id) or $conf['external_authentification'])
+ {
+ return true;
+ }
+
// Rehash using new hash.
$hash = pwg_password_hash($password);