Manual:Setting user groups in MediaWiki
|MediaWiki version:||≥ 1.10|
There is a simple interface (Special:UserRights) for adding a user to or removing a user from one or more user groups.
To do this the acting user must have the
userrights user right, which by default is granted to the Bureaucrats user group.
You can access Special:UserRights directly or via Special:SpecialPages in the toolbox on the left (as of MediaWiki 1.16.0).
For help in using Special:UserRights, refer to Help:User rights and groups.
From source code
As documented into the https://doc.wikimedia.org/mediawiki-core/master/php/User_8php_source.html page.