Fix send lost password feature

This commit is contained in:
Jonathan Ernst
2005-02-06 22:34:43 +00:00
committed by WineHQ
parent 792151c574
commit ddfb83e988
2 changed files with 12 additions and 9 deletions

View File

@@ -409,13 +409,17 @@ function get_active_users_within_days($days)
/**
* Check if a user exists.
* returns TRUE if the user exists
* returns the userid if the user exists
*/
function user_exists($sEmail)
{
$result = query_appdb("SELECT * FROM user_list WHERE email = '$sEmail'");
$result = query_appdb("SELECT userid FROM user_list WHERE email = '$sEmail'");
if(!$result || mysql_num_rows($result) != 1)
return 0;
return 1;
else
{
$oRow = mysql_fetch_object($result);
return $oRow->userid;
}
}
?>