$msg = null;
if ( !\Hooks::run( 'LoginUserMigrated', [ $user, &$msg ] ) ) {
return $this->makeFailResponse(
- $user, null, LoginForm::USER_MIGRATED, $msg, 'LoginUserMigrated'
+ $user, LoginForm::USER_MIGRATED, $msg, 'LoginUserMigrated'
);
}
$abort = LoginForm::ABORTED;
$msg = null;
if ( !\Hooks::run( 'AbortLogin', [ $user, $password, &$abort, &$msg ] ) ) {
- return $this->makeFailResponse( $user, null, $abort, $msg, 'AbortLogin' );
+ return $this->makeFailResponse( $user, $abort, $msg, 'AbortLogin' );
}
return StatusValue::newGood();
// Hook point to add extra creation throttles and blocks
$this->logger->debug( __METHOD__ . ": a hook blocked auto-creation: $abortError\n" );
return $this->makeFailResponse(
- $user, $user, LoginForm::ABORTED, $abortError, 'AbortAutoAccount'
+ $user, LoginForm::ABORTED, $abortError, 'AbortAutoAccount'
);
}
}
/**
* Construct an appropriate failure response
* @param User $user
- * @param User|null $creator
* @param int $constant One of the LoginForm::… constants
* @param string|null $msg Optional message key, will be derived from $constant otherwise
* @param string $hook Name of the hook for error logging and exception messages
* @return StatusValue
*/
- protected function makeFailResponse( $user, $creator, $constant, $msg, $hook ) {
+ private function makeFailResponse( User $user, $constant, $msg, $hook ) {
switch ( $constant ) {
case LoginForm::SUCCESS:
// WTF?