forked from science-ation/science-ation
Fix the existing email check for users with multiple years.
This commit is contained in:
parent
47ee73f3e6
commit
56eb43431c
@ -150,7 +150,7 @@ case 'save':
|
|||||||
|
|
||||||
/* Check for an email collision */
|
/* Check for an email collision */
|
||||||
$em = mysql_escape_string(stripslashes($_POST['email']));
|
$em = mysql_escape_string(stripslashes($_POST['email']));
|
||||||
$q=mysql_query("SELECT id FROM users WHERE email='$em' AND uid!='{$u['uid']}' AND deleted='no'");
|
$q=mysql_query("SELECT *,max(year) FROM users WHERE email='$em' HAVING uid!='{$u['uid']}' AND deleted='no' ");
|
||||||
if(mysql_num_rows($q) > 0) {
|
if(mysql_num_rows($q) > 0) {
|
||||||
error_("That email address is in use by another user");
|
error_("That email address is in use by another user");
|
||||||
echo "email error";
|
echo "email error";
|
||||||
|
Loading…
Reference in New Issue
Block a user