forked from Thunix/www
Check if username already taken
This commit is contained in:
3
articles/success3.md
Normal file
3
articles/success3.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Form Failure
|
||||||
|
|
||||||
|
This username is already registered, please choose another one.
|
||||||
@@ -29,6 +29,12 @@ if ( $tv == "tildeverse" )
|
|||||||
// Success!
|
// Success!
|
||||||
$success = 'success2';
|
$success = 'success2';
|
||||||
|
|
||||||
|
// Check if username already taken
|
||||||
|
$lowercase = strtolower($username);
|
||||||
|
exec("id $lowercase 2>&1", $null, $retval);
|
||||||
|
if($retval == 0)
|
||||||
|
$success = 'success3';
|
||||||
|
|
||||||
if ( $success == "success2" )
|
if ( $success == "success2" )
|
||||||
mail($destination_addr, $subject, $mailbody, $from);
|
mail($destination_addr, $subject, $mailbody, $from);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user