summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-06-18 02:11:17 -0400
committerEvan Prodromou <evan@prodromou.name>2008-06-18 02:11:17 -0400
commit94c4262dcf730afd270fa7d72163e86d5d5de222 (patch)
tree9abedf70eedd199794e62481f745b3d9fdf8263d /actions
parent21463458c55fb138461225cc0402001ce91cb81c (diff)
set nickname correctly
darcs-hash:20080618061117-84dde-6983ed79c2d0e985fc8b00ac7c270b46d92bc20d.gz
Diffstat (limited to 'actions')
-rw-r--r--actions/finishopenidlogin.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/actions/finishopenidlogin.php b/actions/finishopenidlogin.php
index af5ffdf14..80663f4c9 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