Index: trunk/extensions/OpenID/SpecialOpenIDFinish.body.php |
— | — | @@ -175,9 +175,9 @@ |
176 | 176 | $wgUser->SetCookies(); |
177 | 177 | |
178 | 178 | # Run any hooks; ignore results |
| 179 | + $inject_html = ''; |
| 180 | + wfRunHooks( 'UserLoginComplete', array( &$wgUser, &$inject_html ) ); |
179 | 181 | |
180 | | - wfRunHooks('UserLoginComplete', array(&$wgUser)); |
181 | | - |
182 | 182 | # Set a cookie for later check-immediate use |
183 | 183 | |
184 | 184 | $this->loginSetCookie($openid); |
— | — | @@ -186,6 +186,7 @@ |
187 | 187 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
188 | 188 | $wgOut->setArticleRelated( false ); |
189 | 189 | $wgOut->addWikiText( wfMsg( 'openidsuccess', $wgUser->getName(), $openid ) ); |
| 190 | + $wgOut->addHtml( $inject_html ); |
190 | 191 | $wgOut->returnToMain(false, $this->returnTo()); |
191 | 192 | } |
192 | 193 | |
— | — | @@ -354,32 +355,32 @@ |
355 | 356 | |
356 | 357 | # FIXME: only update if there's been a change |
357 | 358 | |
358 | | - if (array_key_exists('nickname', $sreg)) { |
359 | | - $user->setOption('nickname', $sreg['nickname']); |
| 359 | + if ( array_key_exists( 'nickname', $sreg ) ) { |
| 360 | + $user->setOption( 'nickname', $sreg['nickname'] ); |
360 | 361 | } else { |
361 | 362 | $user->setOption('nickname', ''); |
362 | 363 | } |
363 | 364 | |
364 | | - if (array_key_exists('email', $sreg)) { |
| 365 | + if ( array_key_exists( 'email', $sreg ) ) { |
365 | 366 | $user->setEmail( $sreg['email'] ); |
366 | 367 | } else { |
367 | | - $user->setEmail(NULL); |
| 368 | + $user->setEmail( '' ); |
368 | 369 | } |
369 | 370 | |
370 | | - if (array_key_exists('fullname', $sreg) && $wgAllowRealName) { |
| 371 | + if ( array_key_exists( 'fullname', $sreg ) && $wgAllowRealName) { |
371 | 372 | $user->setRealName($sreg['fullname']); |
372 | 373 | } else { |
373 | | - $user->setRealName(NULL); |
| 374 | + $user->setRealName( '' ); |
374 | 375 | } |
375 | 376 | |
376 | | - if (array_key_exists('language', $sreg)) { |
| 377 | + if ( array_key_exists( 'language', $sreg ) ) { |
377 | 378 | # FIXME: check and make sure the language exists |
378 | | - $user->setOption('language', $sreg['language']); |
| 379 | + $user->setOption( 'language', $sreg['language'] ); |
379 | 380 | } else { |
380 | | - $user->setOption('language', NULL); |
| 381 | + $user->setOption( 'language', NULL ); |
381 | 382 | } |
382 | 383 | |
383 | | - if (array_key_exists('timezone', $sreg)) { |
| 384 | + if (array_key_exists( 'timezone', $sreg ) ) { |
384 | 385 | # FIXME: do something with it. |
385 | 386 | # $offset = OpenIDTimezoneToTzoffset($sreg['timezone']); |
386 | 387 | # $user->setOption('timecorrection', $offset); |