]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/finishopenidlogin.php
compile error with lost dot
[quix0rs-gnu-social.git] / actions / finishopenidlogin.php
index 27e5057ec1edef49e0362ab415c65cc7773c7bd6..09102e8442806b7c18b1ac1d443cc5d48e9c53d8 100644 (file)
@@ -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;