}
public function provideAuthentication() {
- $user = \User::newFromName( 'UTSysop' );
- $id = $user->getId();
- $name = $user->getName();
-
$rememberReq = new RememberMeAuthenticationRequest;
$rememberReq->action = AuthManager::ACTION_LOGIN;
$restartResponse2->createRequest->action = AuthManager::ACTION_LOGIN;
$restartResponse2->neededRequests = [ $rememberReq, $restartResponse2->createRequest ];
+ $userName = 'UTSysop';
+
return [
'Failure in pre-auth' => [
StatusValue::newFatal( 'fail-from-pre' ),
'Secondary fail' => [
StatusValue::newGood(),
[
- AuthenticationResponse::newPass( $name ),
+ AuthenticationResponse::newPass( $userName ),
],
$tmp = [
AuthenticationResponse::newFail( $this->message( 'fail-in-secondary' ) ),
'Secondary UI, then abstain' => [
StatusValue::newGood(),
[
- AuthenticationResponse::newPass( $name ),
+ AuthenticationResponse::newPass( $userName ),
],
[
$tmp = AuthenticationResponse::newUI( [ $req ], $this->message( '...' ) ),
],
[
$tmp,
- AuthenticationResponse::newPass( $name ),
+ AuthenticationResponse::newPass( $userName ),
]
],
'Secondary pass' => [
StatusValue::newGood(),
[
- AuthenticationResponse::newPass( $name ),
+ AuthenticationResponse::newPass( $userName ),
],
[
AuthenticationResponse::newPass()
],
[
- AuthenticationResponse::newPass( $name ),
+ AuthenticationResponse::newPass( $userName ),
]
],
];