aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2013-04-04 10:56:51 +0000
committerplegall <plg@piwigo.org>2013-04-04 10:56:51 +0000
commitf23b5fbcaeb2db9ac92c290cc53a9b8ea0b74605 (patch)
tree5a447bdc7ac950d699d2e9842a63ccf1a23c4602
parent1965cbd9c8c0cd13a7ec2350857c9e0f3e98892e (diff)
merge r21236 from branch 2.5 to trunk
bug 2861: avoid "invalid password" with manual upgrade and admin session expired git-svn-id: http://piwigo.org/svn/trunk@22005 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 db9da568c..145d00954 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -1161,8 +1161,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);