]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/finishopenidlogin.php
forgot to return on invalid nickname
[quix0rs-gnu-social.git] / actions / finishopenidlogin.php
index 7033344537f068803158357bfc71fffe6240b1d6..02d8fff9814a88fd0006fec53bdf844ad666d439 100644 (file)
@@ -167,6 +167,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 +228,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'];
@@ -337,6 +342,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;