X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Ffinishopenidlogin.php;h=09102e8442806b7c18b1ac1d443cc5d48e9c53d8;hb=d3679822530e351894ca1f809c97638873832a74;hp=27e5057ec1edef49e0362ab415c65cc7773c7bd6;hpb=15a09c5d694f720ef50f9c82860193545233bcf1;p=quix0rs-gnu-social.git diff --git a/actions/finishopenidlogin.php b/actions/finishopenidlogin.php index 27e5057ec1..09102e8442 100644 --- a/actions/finishopenidlogin.php +++ b/actions/finishopenidlogin.php @@ -130,6 +130,7 @@ class FinishopenidloginAction extends Action { oid_set_last($display); oid_update_user($user, $sreg); common_set_user($user->nickname); + common_real_login(true); $this->go_home($user->nickname); } else { $this->save_values($display, $canonical, $sreg); @@ -167,6 +168,11 @@ class FinishopenidloginAction extends Action { $this->show_form(_t('Nickname must have only letters and numbers and no spaces.')); return; } + + if (!User::allowed_nickname($nickname)) { + $this->show_form(_t('Nickname not allowed.')); + return; + } if (User::staticGet('nickname', $nickname)) { $this->show_form(_t('Nickname already in use. Try another one.')); @@ -248,6 +254,7 @@ class FinishopenidloginAction extends Action { oid_set_last($display); common_set_user($user->nickname); + common_real_login(true); common_redirect(common_local_url('showstream', array('nickname' => $user->nickname))); } @@ -282,6 +289,7 @@ class FinishopenidloginAction extends Action { oid_update_user($user, $sreg); oid_set_last($display); common_set_user($user->nickname); + common_real_login(true); $this->go_home($user->nickname); } @@ -337,6 +345,9 @@ class FinishopenidloginAction extends Action { 'max_length' => 64, 'format' => VALIDATE_NUM . VALIDATE_ALPHA_LOWER))) { return false; + } + if (!User::allowed_nickname($str)) { + return false; } if (User::staticGet('nickname', $str)) { return false;