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
This commit is contained in:
plegall
2013-03-06 08:56:04 +00:00
parent 93cfb52081
commit b9db72e198
+6 -1
View File
@@ -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);