Manual:resetUserEmail.php
MediaWiki version: | ≥ 1.27 Gerrit change 255044 |
MediaWiki file: resetUserEmail.php | |
---|---|
Location: | maintenance/ |
Source code: | master • 1.43.0 • 1.42.4 • 1.39.11 |
Classes: | ResetUserEmail |
Details
editresetUserEmail.php file is a maintenance script to change the email address of users on the wiki, and mark the email address as confirmed. In addition to that, it will set a random password on that account. This will require the user to reset their password in order to be able to login again.
This can be used to set or change an email address on an account that doesn't have a confirmed email address or the email address is no longer accessible. This can also be used to effectively lock an account by setting the email address to a fake one, since it also resets the password.
Usage
editParameters
editOption/Parameter | Description |
---|---|
--no-reset-password | Don't reset the user's password. Defaults to false so that, double negation, the password by default does get reset.
|
--dbuser | The DB user to use for this script |
--dbpass | The password to use for this script |
Username or user ID, if starts with #. | |
Email to assign. |
Example
editTo change a user's, e. g. John Doe, email address to "johndoe@example.com" and reset their password:
$ php maintenance/run.php resetUserEmail John_Doe johndoe@example.com
In MediaWiki version 1.39.10 and earlier, you must invoke maintenance scripts using
php maintenance/scriptName.php
instead of php maintenance/run.php scriptName
.