forked from science-ation/science-ation
Fix contact to actually work with the new user code
This commit is contained in:
parent
eb05b3eaa5
commit
1c99f624e5
@ -34,7 +34,7 @@
|
||||
if($_POST['to'] && $_POST['subject'] && $_POST['message'] && $_POST['from'] && $_POST['fromemail']) {
|
||||
if(isEmailAddress($_POST['fromemail'])) {
|
||||
list($id,$md5email)=split(":",$_POST['to']);
|
||||
$q=mysql_query("SELECT * FROM users WHERE id='$id'");
|
||||
$q=mysql_query("SELECT * FROM users WHERE uid='$id' ORDER BY year DESC LIMIT 1");
|
||||
$r=mysql_fetch_object($q);
|
||||
//if a valid selection is made from the list, then this will always match.
|
||||
if($md5email == md5($r->email)) {
|
||||
@ -104,7 +104,7 @@ function tochange() {
|
||||
if($r2->email) {
|
||||
$name=$r2->firstname.' '.$r2->lastname;
|
||||
if($r2->title) $titlestr=" ($r2->title)"; else $titlestr="";
|
||||
echo "<option value=\"$r2->id:".md5($r2->email)."\"> -{$name}{$titlestr}</option>\n";
|
||||
echo "<option value=\"$r2->uid:".md5($r2->email)."\"> -{$name}{$titlestr}</option>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user