Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
API: corrected login evaluation function
  • Loading branch information
Asimov4 committed Apr 7, 2012
1 parent 14cb4e0 commit 225c024
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SITE/api/login.php
Expand Up @@ -39,7 +39,7 @@ function authentification($EMAIL,$PASSWORD) {
$hash_pass=$PASSWORD;

$result=@mysql_query(sprintf("SELECT user_id,is_valid,privileges FROM user WHERE hash_mail='%s' AND hash_pass='%s'",mysql_real_escape_string($hash_log),mysql_real_escape_string($hash_pass)));
if (!$result)
if (mysql_num_rows($result)==0)
{
return array('SUCCESS' => 'False','MESSAGE' => _('Email and password do not match'));
} else {
Expand Down

0 comments on commit 225c024

Please sign in to comment.