Skip to content

Commit 438eba7

Browse files
mpywTBlindaruktaylorotwell
authored
[9.x] Add hasUser method to Guard contract (#39167)
* [9.x] Add `hasUser` method to Guard contract - #24518 in this PR was added method `hasUser` to the GuardHelper trait. As for me it will be useful to have this method in the contract. * Update Guard.php Co-authored-by: Tetiana Blindaruk <t.blindaruk@gmail.com> Co-authored-by: Taylor Otwell <taylor@laravel.com>
1 parent c7278f1 commit 438eba7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Illuminate/Contracts/Auth/Guard.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ public function id();
4040
*/
4141
public function validate(array $credentials = []);
4242

43+
/**
44+
* Determine if the guard has a user instance.
45+
*
46+
* @return bool
47+
*/
48+
public function hasUser();
49+
4350
/**
4451
* Set the current user.
4552
*

0 commit comments

Comments
 (0)