Set token properly when creating in User::newSystemUser()
authorBrad Jorsch <bjorsch@wikimedia.org>
Sat, 19 Nov 2016 00:54:58 +0000 (19:54 -0500)
committerAnomie <bjorsch@wikimedia.org>
Fri, 2 Dec 2016 17:12:33 +0000 (17:12 +0000)
commit901d575b54f4abad6f82b2425cce9522941ec9d3
tree3943370d04fc7ab1a9ecd54dad165f8b614e387f
parent3315354fd39f9bd60351ca27c73bafa05d449308
Set token properly when creating in User::newSystemUser()

Otherwise callers that don't use 'steal' is going to break because it'll
think it needs to steal the user.

If such a user exists on a wiki, it can be fixed by setting the token to
the invalid token. The easiest way is probably to just call
User::newSystemUser( $name, [ 'steal' => true ] ) with eval.php.

Note there's no way for anyone to use these users unless they steal the
token from the DB, since they still don't have a password, email, or any
other method of authentication or account recovery set up.

Change-Id: I9efd2d2f5fffb4e4411a894f9514cdf2c66663a9
includes/user/User.php