diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2011-09-28 20:49:24 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2011-09-28 20:49:24 -0700 |
commit | 76a6bad6b5015a0b25c0739ac86b7ca0e0620be6 (patch) | |
tree | 9e1a0acb233fbb129929d2c042f24d35c945bafe /src/controllers | |
parent | 5c2af694ded96faba0e74a3c2d2d548faa6ebb9f (diff) |
Force users to give an email address when they create an account.
Diffstat (limited to 'src/controllers')
-rw-r--r-- | src/controllers/Users.class.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/controllers/Users.class.php b/src/controllers/Users.class.php index 52fd33c..57a585c 100644 --- a/src/controllers/Users.class.php +++ b/src/controllers/Users.class.php @@ -138,6 +138,7 @@ class Users extends Controller { @$vars['username' ] = $_POST['auth_name']; @$vars['password1'] = $_POST['auth_password' ]; @$vars['password2'] = $_POST['auth_password_verify']; + @$vars['email'] = $_POST['user_email']; $vars['errors'] = array(); if ($db->getUID($vars['username'])!==false) @@ -151,6 +152,9 @@ class Users extends Controller { if ($matches && $vars['password2'] == '') { $vars['errors'][] = 'no pw'; } + if ($vars['email'] == '') { + $vars['errors'][] = 'no email'; + } foreach ($pm->callHook('antispam_verify') as $plugin=>$valid) { if (!$valid) $vars['errors'][] = 'plugin_'.$plugin; } @@ -165,6 +169,7 @@ class Users extends Controller { $this->showView('users/500'); } else { Login::login($username, $password); + $this->setConf($uid, 'email', $vars['email']); $this->showView('users/created', array('username'=>$username)); } |