From: Evan Prodromou Date: Wed, 18 Jun 2008 06:11:17 +0000 (-0400) Subject: set nickname correctly X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=94c4262dcf730afd270fa7d72163e86d5d5de222;p=quix0rs-gnu-social.git set nickname correctly darcs-hash:20080618061117-84dde-6983ed79c2d0e985fc8b00ac7c270b46d92bc20d.gz --- diff --git a/actions/finishopenidlogin.php b/actions/finishopenidlogin.php index af5ffdf14d..80663f4c95 100644 --- a/actions/finishopenidlogin.php +++ b/actions/finishopenidlogin.php @@ -278,6 +278,7 @@ class FinishopenidloginAction extends Action { $profile->delete(); } + common_set_user($user->nickname); common_redirect(common_local_url('profilesettings')); } @@ -334,9 +335,13 @@ class FinishopenidloginAction extends Action { function best_new_nickname($display, $sreg) { # Try the passed-in nickname - - if ($sreg['nickname'] && $this->is_new_nickname($sreg['nickname'])) { - return $sreg['nickname']; + + + if ($sreg['nickname']) { + $nickname = $this->nicknamize($sreg['nickname']); + if ($this->is_new_nickname($nickname)) { + return $nickname; + } } # Try the full name