dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4540193
)
SessionManager: Notify AuthPlugin when auto-creating accounts
author
Brad Jorsch
<bjorsch@wikimedia.org>
Thu, 21 Jan 2016 20:20:44 +0000
(15:20 -0500)
committer
Brad Jorsch
<bjorsch@wikimedia.org>
Thu, 21 Jan 2016 20:22:09 +0000
(15:22 -0500)
Bug: T74791
Change-Id: Iabb44d58a922051ca2d70a052d6c53734a4f8936
includes/session/SessionManager.php
patch
|
blob
|
history
diff --git
a/includes/session/SessionManager.php
b/includes/session/SessionManager.php
index
0e45468
..
c4f33d0
100644
(file)
--- a/
includes/session/SessionManager.php
+++ b/
includes/session/SessionManager.php
@@
-496,6
+496,16
@@
final class SessionManager implements SessionManagerInterface {
\Hooks::run( 'AuthPluginAutoCreate', array( $user ) );
\Hooks::run( 'LocalUserCreated', array( $user, true ) );
+ # Notify AuthPlugin too
+ $tmpUser = $user;
+ $wgAuth->initUser( $tmpUser, true );
+ if ( $tmpUser !== $user ) {
+ $logger->warning( __METHOD__ . ': ' .
+ get_class( $wgAuth ) . '::initUser() replaced the user object' );
+ }
+
+ $user->saveSettings();
+
# Update user count
\DeferredUpdates::addUpdate( new \SiteStatsUpdate( 0, 0, 0, 0, 1 ) );