forked from science-ation/science-ation
HOpefully fix the 118 update to convert sponsor_contacts to users_sponsor
This commit is contained in:
parent
ac3f5f9eb4
commit
e23149dccc
@ -24,10 +24,10 @@ function db_update_118_post()
|
|||||||
$active="yes";
|
$active="yes";
|
||||||
}
|
}
|
||||||
//see if a user exists with this email
|
//see if a user exists with this email
|
||||||
$uq=mysql_query("SELECT * FROM users WHERE username='".mysql_real_escape_string($r->email)."' AND year='$r->year'");
|
$uq=mysql_query("SELECT * FROM users WHERE (username='".mysql_real_escape_string($r->email)."' OR email='".mysql_real_escape_string($r->email)."') ORDER BY year DESC LIMIT 1"); // AND year='$r->year'");
|
||||||
if($r->email && $ur=mysql_fetch_object($uq)) {
|
if($r->email && $ur=mysql_fetch_object($uq)) {
|
||||||
$user_id=$ur->id;
|
$user_id=$ur->id;
|
||||||
echo "Using existing users.id=$user_id for award_contacts.id=$r->id because email address/year ($r->email/$r->year) matches\n";
|
echo "Using existing users.id=$user_id for award_contacts.id=$r->id because email address ($r->email) matches\n";
|
||||||
|
|
||||||
//update any info we have thats missing
|
//update any info we have thats missing
|
||||||
$sqlset="";
|
$sqlset="";
|
||||||
|
Loading…
Reference in New Issue
Block a user