Skip to content

Commit 9c8d79c

Browse files
author
Greg Bowler
committed
tweak: pass in email you would like
1 parent 3fca120 commit 9c8d79c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Authenticator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ public function logout(Token $token = null):void {
9999
}
100100
}
101101

102-
public function fakeLogin(string $userId, string $redirectTo = "/"):void {
102+
public function fakeLogin(string $userId, ?string $email = null, string $redirectTo = "/"):void {
103103
$secretIv = new InitVector();
104104
$token = new Token($this->secret, $secretIv);
105105
$sessionData = new SessionData($token);
106106
$this->session->set(SessionData::class, $sessionData);
107107

108108
$userData = new UserResponseData(
109109
$userId,
110-
self::FAKE_EMAIL,
110+
$email ?? self::FAKE_EMAIL,
111111
);
112112

113113
$this->session->set(

0 commit comments

Comments
 (0)