* @return array Tuple of added, then removed groups
*/
function doSaveUserGroups( $user, $add, $remove, $reason = '' ) {
- global $wgAuth;
-
// Validate input set...
$isself = $user->getName() == $this->getUser()->getName();
$groups = $user->getGroups();
// update groups in external authentication database
Hooks::run( 'UserGroupsChanged', [ $user, $add, $remove, $this->getUser(), $reason ] );
- $wgAuth->updateExternalDBGroups( $user, $add, $remove );
+ MediaWiki\Auth\AuthManager::callLegacyAuthPlugin(
+ 'updateExternalDBGroups', [ $user, $add, $remove ]
+ );
wfDebug( 'oldGroups: ' . print_r( $oldGroups, true ) . "\n" );
wfDebug( 'newGroups: ' . print_r( $newGroups, true ) . "\n" );
return Status::newGood( $user );
}
- function makeGroupNameList( $ids ) {
- if ( empty( $ids ) ) {
- return $this->msg( 'rightsnone' )->inContentLanguage()->text();
- } else {
- return implode( ', ', $ids );
- }
- }
-
/**
- * Make a list of group names to be stored as parameter for log entries
+ * @since 1.15
*
- * @deprecated since 1.21; use LogFormatter instead.
* @param array $ids
+ *
* @return string
*/
- function makeGroupNameListForLog( $ids ) {
- wfDeprecated( __METHOD__, '1.21' );
-
+ public function makeGroupNameList( $ids ) {
if ( empty( $ids ) ) {
- return '';
+ return $this->msg( 'rightsnone' )->inContentLanguage()->text();
} else {
- return $this->makeGroupNameList( $ids );
+ return implode( ', ', $ids );
}
}