Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
f61d8660
Commit
f61d8660
authored
Oct 30, 2018
by
Christian Giupponi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added return type and used getUser function instead of check
parent
fa5cccd4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
SentinelAuthentication.php
...les/User/Repositories/Sentinel/SentinelAuthentication.php
+4
-4
No files found.
Modules/User/Repositories/Sentinel/SentinelAuthentication.php
View file @
f61d8660
...
@@ -123,7 +123,7 @@ class SentinelAuthentication implements Authentication
...
@@ -123,7 +123,7 @@ class SentinelAuthentication implements Authentication
* @param $permission
* @param $permission
* @return bool
* @return bool
*/
*/
public
function
hasAccess
(
$permission
)
public
function
hasAccess
(
$permission
)
:
bool
{
{
if
(
!
Sentinel
::
check
())
{
if
(
!
Sentinel
::
check
())
{
return
false
;
return
false
;
...
@@ -136,7 +136,7 @@ class SentinelAuthentication implements Authentication
...
@@ -136,7 +136,7 @@ class SentinelAuthentication implements Authentication
* Check if the user is logged in
* Check if the user is logged in
* @return bool
* @return bool
*/
*/
public
function
check
()
public
function
check
()
:
bool
{
{
$user
=
Sentinel
::
check
();
$user
=
Sentinel
::
check
();
...
@@ -153,14 +153,14 @@ class SentinelAuthentication implements Authentication
...
@@ -153,14 +153,14 @@ class SentinelAuthentication implements Authentication
*/
*/
public
function
user
()
public
function
user
()
{
{
return
Sentinel
::
check
();
return
Sentinel
::
getUser
();
}
}
/**
/**
* Get the ID for the currently authenticated user
* Get the ID for the currently authenticated user
* @return int
* @return int
*/
*/
public
function
id
()
public
function
id
()
:
int
{
{
$user
=
$this
->
user
();
$user
=
$this
->
user
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment