djm204
djm204

Reputation: 21

Automatically add new accounts to a user group in MediaWiki

I want to set a default user group for new accounts created on a private MediaWiki installation.

So when I create an account it will automatically be added to the user group "The-User-Group-I-Specify".

Upvotes: 1

Views: 431

Answers (1)

Sam Wilson
Sam Wilson

Reputation: 4512

You can do this by using the LocalUserCreated hook in your LocalSettings.php file:

$wgHooks['LocalUserCreated'][] = function ( User $user, $autocreated ) {
    $user->addGroup( 'The-User-Group-I-Specify' );
};

Upvotes: 5

Related Questions