It looks like the way to do it would be to run a query like so:
$user = User::newFromName( $userName );
$dbw = wfGetDB( DB_MASTER );
$dbw->insert( 'user_groups', array( 'ug_user' => $user->getID(), 'ug_group' => 'bot', ), 'User::addGroup', array( 'IGNORE' ) );
But if I am not logged in, this does not seem to work.
Any ideas?
On Jun 19, 2011, at 8:55 PM, Adam Meyer wrote:
Im working on the phpbb Single-Signon extension and I wanted to amke it so that users who are moderators are automatically made sysops on the wiki.
Other than modifying the database, is there any way in code to make a user a sysop (without having it done by a bureaucrat)? _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l