Username passed lowercased once
This commit is contained in:
parent
0833e91520
commit
cfd6ccdbbc
|
@ -9,6 +9,9 @@ $interest = $_GET['interest'];
|
||||||
$pubkey = $_GET['pubkey'];
|
$pubkey = $_GET['pubkey'];
|
||||||
$tv = $_GET['tv'];
|
$tv = $_GET['tv'];
|
||||||
|
|
||||||
|
// username passed lowercased
|
||||||
|
$username = strtolower($username);
|
||||||
|
|
||||||
$from = 'From: www-data <www-data@thunix.net>';
|
$from = 'From: www-data <www-data@thunix.net>';
|
||||||
$destination_addr = "newuser@thunix.net";
|
$destination_addr = "newuser@thunix.net";
|
||||||
$subject = "New User Registration";
|
$subject = "New User Registration";
|
||||||
|
@ -32,8 +35,7 @@ if ( $tv == "tildeverse" )
|
||||||
$success = 'success2';
|
$success = 'success2';
|
||||||
|
|
||||||
// Check if username already taken
|
// Check if username already taken
|
||||||
$lowercase = strtolower($username);
|
exec("id $username 2>&1", $null, $retval);
|
||||||
exec("id $lowercase 2>&1", $null, $retval);
|
|
||||||
if($retval == 0)
|
if($retval == 0)
|
||||||
$success = 'success3';
|
$success = 'success3';
|
||||||
|
|
||||||
|
@ -45,7 +47,7 @@ if ( $tv == "tildeverse" )
|
||||||
if ( $success == "success2" )
|
if ( $success == "success2" )
|
||||||
mail($destination_addr, $subject, $mailbody, $from);
|
mail($destination_addr, $subject, $mailbody, $from);
|
||||||
$fp = fopen($user_queue, 'a');
|
$fp = fopen($user_queue, 'a');
|
||||||
fwrite($fp, "'$lowercase','$email','$pubkey'\n");
|
fwrite($fp, "'$username','$email','$pubkey'\n");
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue