Make judges registration 'resend password' work (by adding code that was never there! whoops!)

This commit is contained in:
james 2006-01-03 01:49:28 +00:00
parent d8321449f9
commit 0adc204a58
2 changed files with 31 additions and 0 deletions

View File

@ -22,6 +22,17 @@
*/
?>
<?
$preferencechoices=array(
-2=>"Very Low",
-1=>"Low",
0=>"Indifferent",
1=>"Medium",
2=>"High"
);
function personalStatus()
{
global $config;

View File

@ -89,6 +89,26 @@
$_POST['action']="login";
}
}
else if($_GET['action']=="resend" && $_SESSION['email'])
{
//first see if the email matches directly from the registrations table
$q=mysql_query("SELECT * FROM judges
WHERE
email='".$_SESSION['email']."'
");
$r=mysql_fetch_object($q);
if($r)
{
email_send("register_judges_resend_password",$_SESSION['email'],array("FAIRNAME"=>i18n($config['fairname'])),array("PASSWORD"=>$r->password,"EMAIL"=>$r->email));
send_header("Judges Registration");
echo notice(i18n("Your judge registration password has been sent to your email addess <b>%1</b>",array($_SESSION['email'])));
}
else
{
send_header("Judges Registration");
echo error(i18n("Could not find a judge record with your email address"));
}
}
else if($_GET['action']=="logout")
{
unset($_SESSION['email']);