X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Ffinishopenidlogin.php;h=09102e8442806b7c18b1ac1d443cc5d48e9c53d8;hb=d3679822530e351894ca1f809c97638873832a74;hp=7033344537f068803158357bfc71fffe6240b1d6;hpb=aabac60b6eb04b7f4c25a96fa1c103baf1cf53e0;p=quix0rs-gnu-social.git diff --git a/actions/finishopenidlogin.php b/actions/finishopenidlogin.php index 7033344537..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.')); @@ -223,7 +229,7 @@ class FinishopenidloginAction extends Action { $user = new User(); $user->id = $id; $user->nickname = $nickname; - $user->uri = common_mint_tag('user:'.$id); + $user->uri = common_user_uri($user); if ($sreg['email'] && Validate::email($sreg['email'], true)) { $user->email = $sreg['email']; @@ -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;