Page MenuHomePhabricator

LoginUserMigrated hook causing Fatal Error: Argument 1 passed to CentralAuthUser::getInstance() must be an instance of User, bool given
Closed, ResolvedPublic

Description

In specialuserlogin.php:

		$u = User::newFromName( $this->mUsername );

		// Give extensions a way to indicate the username has been updated,
		// rather than telling the user the account doesn't exist.
		if ( !Hooks::run( 'LoginUserMigrated', array( $u, &$msg ) ) ) {
			$this->mAbortLoginErrorMsg = $msg;
			return self::USER_MIGRATED;
		}

		if ( !( $u instanceof User ) || !User::isUsableName( $u->getName() ) ) {
			return self::ILLEGAL;
		}

Hook immediately calls $centralUser = CentralAuthUser::getInstance( $user );.

Event Timeline

Legoktm created this task.Apr 15 2015, 3:13 PM
Legoktm raised the priority of this task from to Unbreak Now!.
Legoktm updated the task description. (Show Details)
Legoktm added a subscriber: Legoktm.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 15 2015, 3:13 PM

Change 204278 had a related patch set uploaded (by Legoktm):
Fix fatals in LoginUserMigrated hook

https://gerrit.wikimedia.org/r/204278

Change 204278 merged by jenkins-bot:
Fix fatals in LoginUserMigrated hook

https://gerrit.wikimedia.org/r/204278

Change 204281 had a related patch set uploaded (by Chad):
Fix fatals in LoginUserMigrated hook

https://gerrit.wikimedia.org/r/204281

Change 204281 merged by jenkins-bot:
Fix fatals in LoginUserMigrated hook

https://gerrit.wikimedia.org/r/204281

Legoktm closed this task as Resolved.Apr 15 2015, 5:54 PM
Legoktm claimed this task.

Quick fix deployed. Follow up actual fix bug is T96174.

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:11 PM