Skip to content
Permalink
Browse files

merge r31167 from branch 2.7 to trunk

bug 3223 fixed: make sure we have found a user before validating the connection


git-svn-id: http://piwigo.org/svn/trunk@31168 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information...
plegall committed May 15, 2015
1 parent a1b9956 commit e520cf83894e8a41aa4c9748b8b37f5e61265265
Showing with 1 addition and 1 deletion.
  1. +1 −1 include/functions_user.inc.php
@@ -1116,7 +1116,7 @@ function pwg_login($success, $username, $password, $remember_me)
WHERE '.$conf['user_fields']['username'].' = \''.pwg_db_real_escape_string($username).'\'
;';
$row = pwg_db_fetch_assoc(pwg_query($query));
if ($conf['password_verify']($password, $row['password'], $row['id']))
if (isset($row['id']) and $conf['password_verify']($password, $row['password'], $row['id']))
{
log_user($row['id'], $remember_me);
trigger_notify('login_success', stripslashes($username));

0 comments on commit e520cf8

Please sign in to comment.
You can’t perform that action at this time.