From 16971fb8bb489b371f2cb0cb63e2dbd7bb86976f Mon Sep 17 00:00:00 2001 From: darek Date: Wed, 18 Oct 2017 08:55:54 +0200 Subject: [PATCH] Change Sentinel::check to guest --- .gitignore | 1 + Repositories/Sentinel/SentinelAuthentication.php | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index a20d87b6..d102693a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ composer.lock Modules/ build +/nbproject/private/ \ No newline at end of file diff --git a/Repositories/Sentinel/SentinelAuthentication.php b/Repositories/Sentinel/SentinelAuthentication.php index b436b52f..bd2bd98d 100644 --- a/Repositories/Sentinel/SentinelAuthentication.php +++ b/Repositories/Sentinel/SentinelAuthentication.php @@ -125,7 +125,7 @@ public function completeResetPassword($user, $code, $password) */ public function hasAccess($permission) { - if (! Sentinel::check()) { + if (Sentinel::guest()) { return false; } @@ -138,9 +138,8 @@ public function hasAccess($permission) */ public function check() { - $user = Sentinel::check(); - - if ($user) { + + if (! Sentinel::guest()) { return true; }