dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "registration: Only allow one extension to set a specific config setting"
[lhc/web/wiklou.git]
/
includes
/
user
/
User.php
diff --git
a/includes/user/User.php
b/includes/user/User.php
index
6115144
..
1c894a0
100644
(file)
--- a/
includes/user/User.php
+++ b/
includes/user/User.php
@@
-1462,15
+1462,17
@@
class User implements IDBAccessObject {
}
$oldGroups = $this->getGroups(); // previous groups
}
$oldGroups = $this->getGroups(); // previous groups
+ $oldUGMs = $this->getGroupMemberships();
foreach ( $toPromote as $group ) {
$this->addGroup( $group );
}
foreach ( $toPromote as $group ) {
$this->addGroup( $group );
}
+ $newGroups = array_merge( $oldGroups, $toPromote ); // all groups
+ $newUGMs = $this->getGroupMemberships();
+
// update groups in external authentication database
// update groups in external authentication database
- Hooks::run( 'UserGroupsChanged', [ $this, $toPromote, [], false, false ] );
+ Hooks::run( 'UserGroupsChanged', [ $this, $toPromote, [], false, false
, $oldUGMs, $newUGMs
] );
AuthManager::callLegacyAuthPlugin( 'updateExternalDBGroups', [ $this, $toPromote ] );
AuthManager::callLegacyAuthPlugin( 'updateExternalDBGroups', [ $this, $toPromote ] );
- $newGroups = array_merge( $oldGroups, $toPromote ); // all groups
-
$logEntry = new ManualLogEntry( 'rights', 'autopromote' );
$logEntry->setPerformer( $this );
$logEntry->setTarget( $this->getUserPage() );
$logEntry = new ManualLogEntry( 'rights', 'autopromote' );
$logEntry->setPerformer( $this );
$logEntry->setTarget( $this->getUserPage() );