X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=testing%2FMCTXWeb%2Fpublic_html%2Fusers%2Fregister.php;fp=testing%2FMCTXWeb%2Fpublic_html%2Fusers%2Fregister.php;h=32f1ae16d5f899790c8662014cae92ee54783e71;hb=bd5fabfeabdd16cf38642c8cfb2232aab495de31;hp=0000000000000000000000000000000000000000;hpb=e45973cf0c94d57c506b4a3c4a60f3b28278be37;p=matches%2FMCTX3420.git diff --git a/testing/MCTXWeb/public_html/users/register.php b/testing/MCTXWeb/public_html/users/register.php new file mode 100644 index 0000000..32f1ae1 --- /dev/null +++ b/testing/MCTXWeb/public_html/users/register.php @@ -0,0 +1,144 @@ +status) + { + if($user->username_taken) $errors[] = lang("ACCOUNT_USERNAME_IN_USE",array($username)); + if($user->displayname_taken) $errors[] = lang("ACCOUNT_DISPLAYNAME_IN_USE",array($displayname)); + if($user->email_taken) $errors[] = lang("ACCOUNT_EMAIL_IN_USE",array($email)); + } + else + { + //Attempt to add the user to the database, carry out finishing tasks like emailing the user (if required) + if(!$user->userCakeAddUser()) + { + if($user->mail_failure) $errors[] = lang("MAIL_ERROR"); + if($user->sql_failure) $errors[] = lang("SQL_ERROR"); + } + } + } + if(count($errors) == 0) { + $successes[] = $user->success; + } +} + +require_once("models/header.php"); +echo " + +
+
+
+

UserCake

+

Register

+ +
"; +include("left-nav.php"); +echo " +
+ +
"; + +echo resultBlock($errors,$successes); + +echo " +
+
+ +

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+ + +

+
+ +
+
+
+ +"; +?>