Page MenuHomePhabricator

extension/AbsenteeLandlord - Use UserGroupManager instead of User group methods
Closed, ResolvedPublic

Description

Find all usages of:

  • public function getGroups()
  • public function getGroupMemberships()
  • public function getEffectiveGroups()
  • public function getAutomaticGroups()
  • public function getFormerGroups()
  • public function addGroup()
  • public function removeGroup()
  • public function addAutopromoteOnceGroups())

and need to be replaced with corresponding UserGroupManager methods.
You can obtain UserGroupManager via MediaWikiServices::getInstance()->getUserGroupManager(), but it's preferred to inject it if possible.

Event Timeline

Vlad.shapik triaged this task as Medium priority.May 4 2021, 1:09 PM
Vlad.shapik created this task.
Vlad.shapik renamed this task from extension/AbsenteeLandlord - hard deprecate User group methods to extension/AbsenteeLandlord - Use UserGroupManager instead of User group methods.May 6 2021, 2:37 PM

Change 700379 had a related patch set uploaded (by Vlad.shapik; author: Vlad.shapik):

[mediawiki/extensions/AbsenteeLandlord@master] Avoid using of User::getGroups

https://gerrit.wikimedia.org/r/700379

Change 856064 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/AbsenteeLandlord@master] Replace deprecated User::getGroups

https://gerrit.wikimedia.org/r/856064

Change 856064 merged by jenkins-bot:

[mediawiki/extensions/AbsenteeLandlord@master] Replace deprecated User::getGroups

https://gerrit.wikimedia.org/r/856064