How to change user email address in MediaWiki

With sysop access and database access, how to change the email address associated with the user?

In the user table in the database, everything is encoded as a BLOB. If I can decode and encode these values, I can simply update user.user_email.

+7
source share
2 answers

UPDATE user SET user_email=' foo@bar.com ' WHERE user_id=... should work. However, if you also need to set the confirmation flag, see the instructions here (replace the mwscript line with php maintenance/eval.php ). If you need to set your email address only so that they can reset their password, see https://www.mediawiki.org/wiki/Manual:Resetting_passwords

You can get a current list of users and emails like this (e.g. decode):

 SELECT Cast(user_name AS CHAR), Cast(User_Email AS CHAR) FROM user; 
+8
source

MaxSem's answer didn’t work for me, but here is the MediaWiki service script (introduced in v1.27) that will do the trick: https://www.mediawiki.org/wiki/Manual:ResetUserEmail.php

Go to the base directory of your wiki and enter something like this:
php maintenance/resetUserEmail.php uuuu new@email.address
change user email address to new@email.address. By default, this will change the user's password, so the user will have to reset it, which can usually be done on the wiki site. You may need to add a username and password to access the database, for example:
php maintenance/resetUserEmail.php --dbuser myuser --dbpass wordpass uuuu new@email.address

0
source

Source: https://habr.com/ru/post/980827/


All Articles