diff --git a/articles/success3.md b/articles/success3.md new file mode 100644 index 0000000..a004ed0 --- /dev/null +++ b/articles/success3.md @@ -0,0 +1,3 @@ +# Form Failure + +This username is already registered, please choose another one. diff --git a/includes/signup.php b/includes/signup.php index 40e2939..fdde86c 100644 --- a/includes/signup.php +++ b/includes/signup.php @@ -28,6 +28,12 @@ if ( $tv == "tildeverse" ) { // Success! $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" ) mail($destination_addr, $subject, $mailbody, $from);