maintenance: Replace deprecated User::idFromName
Bug: T325687 Change-Id: I01c0a4ec1076ff360cd93cef86e0b40967e61f46
This commit is contained in:
parent
bb95e89c23
commit
d56f7e5dbc
1 changed files with 2 additions and 2 deletions
|
|
@ -94,8 +94,8 @@ class CreateBotPassword extends Maintenance {
|
|||
|
||||
$passwordFactory = $services->getPasswordFactory();
|
||||
|
||||
$userId = User::idFromName( $username );
|
||||
if ( $userId === null ) {
|
||||
$userIdentity = $services->getUserIdentityLookup()->getUserIdentityByName( $username );
|
||||
if ( !$userIdentity || !$userIdentity->isRegistered() ) {
|
||||
$this->fatalError( "Cannot create bot password for non-existent user '$username'." );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue