3

We have a closed wiki - and we want to set all existing users accounts to be confirmed. (when the user was added the email was added)

We also want to have that setting automatically set to true for new users.

What I want to do:

  • Default the email confirmed to true for all new users that we create/add
  • Set the email confirmed for all existing users without requiring the user to take any action

(I realize this may not be desirable however, it is a closed system and the emails have already been vetted/verified)

How can I achieve this?

EDIT: I tried using the ImportUsers plugin - with the 'emailconfirmed' user group populated - but that did not work as I had hoped. It did work for other group names.

Is there a way I can get to the database directly?

Nemo
  • 2,441
  • 2
  • 29
  • 63
Tim
  • 20,184
  • 24
  • 117
  • 214
  • What version of MediaWiki are you running? That `emailconfirmed` user group/right seems to be deprecated – Bergi Sep 18 '14 at 18:17

2 Answers2

1

To confirm all currently unconfirmed users you could run this query against the database:

UPDATE `mw_user` 
SET `user_email_authenticated`= DATE_FORMAT(NOW(),'%Y%m%d%H%i%s') 
WHERE `user_email_authenticated` IS null

The information to access your database should already be present in your LocalSettings.php file, you can access the database using the credentials saved there with a tool like Navicat or MySQL Query Browser

However, there seems to be no simple way already present in MediaWiki to automatically set newly registered users to confirmed.

There are some plugins that hook into the code when a new user is registered, so technically it would be possible to write an extension that does exactly what you want. Or you could run this query manually when you register a user.

Stephan Muller
  • 27,018
  • 16
  • 85
  • 126
  • Does that really work? The "emailconfirmed" permission is/was an implicit autopromoted group. Autopromotion happens upon certain events. – Nemo Apr 28 '15 at 21:45
0

It might help to also ask yourself - why do you need them confirmed?

I was in a similar situation and the answer for me was to remove this line from the server's LocalSettings.php:

$wgEmailConfirmToEdit = true;

Now my users don't have a reason to confirm their emails.

Carolus
  • 477
  • 4
  • 16