Skip to content

Commit 3611242

Browse files
authored
Revert "[10.x] Remove session on authenticatable deletion v2 (#47141)" (#47354)
This reverts commit 8fe2f65.
1 parent 6ba1b83 commit 3611242

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

src/Illuminate/Auth/SessionGuard.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,6 @@ public function user()
173173
}
174174
}
175175

176-
if (is_null($this->user)) {
177-
$this->clearUserDataFromStorage();
178-
}
179-
180176
return $this->user;
181177
}
182178

tests/Auth/AuthGuardTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,6 @@ public function testAuthenticateThrowsWhenUserIsNull()
262262
$this->expectExceptionMessage('Unauthenticated.');
263263

264264
$guard = $this->getGuard();
265-
$guard->setCookieJar($cookies = m::mock(CookieJar::class));
266-
$cookies->shouldReceive('unqueue')->once();
267-
$guard->getSession()->shouldReceive('remove')->once();
268265
$guard->getSession()->shouldReceive('get')->once()->andReturn(null);
269266

270267
$guard->authenticate();
@@ -316,9 +313,6 @@ public function testUserMethodReturnsCachedUser()
316313
public function testNullIsReturnedForUserIfNoUserFound()
317314
{
318315
$mock = $this->getGuard();
319-
$mock->setCookieJar($cookies = m::mock(CookieJar::class));
320-
$cookies->shouldReceive('unqueue')->once();
321-
$mock->getSession()->shouldReceive('remove')->once();
322316
$mock->getSession()->shouldReceive('get')->once()->andReturn(null);
323317
$this->assertNull($mock->user());
324318
}

0 commit comments

Comments
 (0)