diff options
author | wushin <pasekei@gmail.com> | 2015-11-09 16:04:29 -0600 |
---|---|---|
committer | wushin <pasekei@gmail.com> | 2015-11-09 16:04:29 -0600 |
commit | c70c322e4265cf516c85dfb32cfd22f7cfaeb666 (patch) | |
tree | 2eb8ea37bceadf766d691656e2033b8771e90c70 | |
parent | 7fd44e660d0d6344e3648e06564135984377e0de (diff) | |
download | website-c70c322e4265cf516c85dfb32cfd22f7cfaeb666.tar.gz website-c70c322e4265cf516c85dfb32cfd22f7cfaeb666.tar.bz2 website-c70c322e4265cf516c85dfb32cfd22f7cfaeb666.tar.xz website-c70c322e4265cf516c85dfb32cfd22f7cfaeb666.zip |
Make Accounts Not use gender
-rw-r--r-- | extensions/tmwa/backend/models/account.php | 6 | ||||
-rw-r--r-- | extensions/tmwa/frontend/registration.php | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/extensions/tmwa/backend/models/account.php b/extensions/tmwa/backend/models/account.php index 7f5b0fe..aaabd41 100644 --- a/extensions/tmwa/backend/models/account.php +++ b/extensions/tmwa/backend/models/account.php @@ -3,6 +3,7 @@ class TMWAccount { const GENDER_MALE = 'M'; const GENDER_FEMALE = 'F'; + const GENDER_NEUTRAL = 'N'; const BAD_STRING_DESC = 'Only alphanumeric characters are allowed.'; private $errors; @@ -71,9 +72,10 @@ class TMWAccount } if ($this->gender != self::GENDER_MALE && - $this->gender != self::GENDER_FEMALE ) + $this->gender != self::GENDER_FEMALE && + $this->gender != self::GENDER_NEUTRAL) { - $errors[] = 'Gender has to be Male or Female!'; + $errors[] = 'Gender has to be picked!'; } if (!filter_var($this->email, FILTER_VALIDATE_EMAIL)) diff --git a/extensions/tmwa/frontend/registration.php b/extensions/tmwa/frontend/registration.php index ad05e3a..52b71e0 100644 --- a/extensions/tmwa/frontend/registration.php +++ b/extensions/tmwa/frontend/registration.php @@ -34,7 +34,7 @@ class GameAccountPage extends SpecialPage { $acc->setPassword1($request->getText('password1')); $acc->setPassword2($request->getText('password2')); $acc->setEMail($request->getText('email')); - $acc->setGender($request->getText('gender')); + $acc->setGender('N'); $this->err = $acc->validate(); global $wgCaptchaClass; @@ -72,7 +72,7 @@ class GameAccountPage extends SpecialPage { <tr><td>Password:</td><td><input type="password" size="20" name="password1" /></td></tr> <tr><td>Retype password:</td><td><input type="password" size="20" name="password2" /></td></tr> <tr><td>EMail:</td><td><input type="text" size="30" name="email" /></td></tr> - <tr><td>Character\'s Gender:</td> + <!-- tr><td>Character\'s Gender:</td> <td> <select name="gender"> <option value="0" selected></option> @@ -80,7 +80,7 @@ class GameAccountPage extends SpecialPage { <option value="F">Female</option> </select> </td> - </tr><tr><td colspan="2">'; + </tr --><tr><td colspan="2">'; global $wgCaptchaClass, $wgConfirmAccountCaptchas; if ($wgConfirmAccountCaptchas) { $captcha = new $wgCaptchaClass; |