summaryrefslogtreecommitdiff
path: root/actions/finishopenidlogin.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-08-24 16:55:49 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-08-24 16:55:49 -0400
commitff87732053bae38879988ba7d002a294998ccb4e (patch)
treeccccfe7fc8976baf1f0cd4438a57bf817dc4052c /actions/finishopenidlogin.php
parent27aeba01dd366f15f7847267b7518fb873987ddb (diff)
parentf3cdc7f272e409d391979d3e6c58dd63573530c0 (diff)
Merge branch '0.8.x' into testing
Conflicts: actions/twitterauthorization.php lib/oauthclient.php lib/twitter.php lib/twitterapi.php lib/twitteroauthclient.php scripts/twitterstatusfetcher.php
Diffstat (limited to 'actions/finishopenidlogin.php')
-rw-r--r--actions/finishopenidlogin.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/actions/finishopenidlogin.php b/actions/finishopenidlogin.php
index ff0b35218..a29195826 100644
--- a/actions/finishopenidlogin.php
+++ b/actions/finishopenidlogin.php
@@ -30,7 +30,9 @@ class FinishopenidloginAction extends Action
function handle($args)
{
parent::handle($args);
- if (common_is_real_login()) {
+ if (!common_config('openid', 'enabled')) {
+ common_redirect(common_local_url('login'));
+ } else if (common_is_real_login()) {
$this->clientError(_('Already logged in.'));
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$token = $this->trimmed('token');
@@ -217,7 +219,7 @@ class FinishopenidloginAction extends Action
if (!Validate::string($nickname, array('min_length' => 1,
'max_length' => 64,
- 'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
+ 'format' => NICKNAME_FMT))) {
$this->showForm(_('Nickname must have only lowercase letters and numbers and no spaces.'));
return;
}
@@ -389,7 +391,7 @@ class FinishopenidloginAction extends Action
{
if (!Validate::string($str, array('min_length' => 1,
'max_length' => 64,
- 'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) {
+ 'format' => NICKNAME_FMT))) {
return false;
}
if (!User::allowed_nickname($str)) {