Skip to content

Commit

Permalink
Clear a cached user in RequestGuard if a request is changed (#35692)
Browse files Browse the repository at this point in the history
* Clear a cached user in RequestGuard if a request is changed

This guard retrieves a user from a request data, so a cached user should be cleared on a request change.

* fix indentation
  • Loading branch information
n7olkachev committed Dec 22, 2020
1 parent d30dbeb commit 0d601f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Illuminate/Auth/RequestGuard.php
Expand Up @@ -82,6 +82,8 @@ public function setRequest(Request $request)
{
$this->request = $request;

$this->user = null;

return $this;
}
}

0 comments on commit 0d601f5

Please sign in to comment.