summaryrefslogtreecommitdiff
path: root/actions/register.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-01-15 23:03:38 +0000
committerEvan Prodromou <evan@controlyourself.ca>2009-01-15 23:03:38 +0000
commit4b0cf99e56f965e10eeb8b8b19e7b405bda49eaf (patch)
tree094c2948648d79290326130f9cd75a95afc6035d /actions/register.php
parenteaa81d25fa7bd954132ce7f901fae69b0d46ec1a (diff)
Convert use of common_server_error and common_user_error to methods on Action
Diffstat (limited to 'actions/register.php')
-rw-r--r--actions/register.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/actions/register.php b/actions/register.php
index bac179687..b4d0d43fb 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -26,9 +26,9 @@ class RegisterAction extends Action
parent::handle($args);
if (common_config('site', 'closed')) {
- common_user_error(_('Registration not allowed.'));
+ $this->clientError(_('Registration not allowed.'));
} else if (common_logged_in()) {
- common_user_error(_('Already logged in.'));
+ $this->clientError(_('Already logged in.'));
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$this->try_register();
} else {
@@ -65,7 +65,7 @@ class RegisterAction extends Action
}
if (common_config('site', 'inviteonly') && !($code && $invite)) {
- $this->client_error(_('Sorry, only invited people can register.'));
+ $this->clientError(_('Sorry, only invited people can register.'));
return;
}
@@ -115,7 +115,7 @@ class RegisterAction extends Action
}
# success!
if (!common_set_user($user)) {
- common_server_error(_('Error setting user.'));
+ $this->serverError(_('Error setting user.'));
return;
}
# this is a real login
@@ -179,7 +179,7 @@ class RegisterAction extends Action
}
if (common_config('site', 'inviteonly') && !($code && $invite)) {
- $this->client_error(_('Sorry, only invited people can register.'));
+ $this->clientError(_('Sorry, only invited people can register.'));
return;
}