diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-02-26 13:36:10 -0800 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-02-26 13:36:10 -0800 |
commit | 2bf5b23016ab4929a1c9197907d4a621bb888742 (patch) | |
tree | 21442677e48ed54469fb387e1c3a0b7f3f7687a9 /actions | |
parent | 34a61b40f47a52d1fdcf7cd907f3ac53b96b038e (diff) |
fix notice in register
Diffstat (limited to 'actions')
-rw-r--r-- | actions/register.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/actions/register.php b/actions/register.php index 5d7a8ce69..5c6fe39d3 100644 --- a/actions/register.php +++ b/actions/register.php @@ -131,11 +131,13 @@ class RegisterAction extends Action $code = $this->trimmed('code'); + $invite = null; + if ($code) { $invite = Invitation::staticGet($code); } - if (common_config('site', 'inviteonly') && !($code && $invite)) { + if (common_config('site', 'inviteonly') && !($code && !empty($invite))) { $this->clientError(_('Sorry, only invited people can register.')); return; } @@ -341,6 +343,8 @@ class RegisterAction extends Action { $code = $this->trimmed('code'); + $invite = null; + if ($code) { $invite = Invitation::staticGet($code); } @@ -377,7 +381,7 @@ class RegisterAction extends Action _('Same as password above. Required.')); $this->elementEnd('li'); $this->elementStart('li'); - if ($invite && $invite->address_type == 'email') { + if (!empty($invite) && $invite->address_type == 'email') { $this->input('email', _('Email'), $invite->address, _('Used only for updates, announcements, '. 'and password recovery')); |