AuthenticationService
in package
Read onlyYes
AuthenticationService used for user authentication
Table of Contents
Properties
Methods
- __construct() : mixed
- getCurrentUser() : User|null
- Returns currently logged user
- getCurrentUserId() : int|null
- Returns current users id
- isUserLoggedIn() : bool
- Checks if there is a user logged in the session
- logout() : void
- Logs out current user
Properties
$userRepository
private
UserRepositoryInterface
$userRepository
Methods
__construct()
public
__construct(UserRepositoryInterface $userRepository) : mixed
Parameters
- $userRepository : UserRepositoryInterface
getCurrentUser()
Returns currently logged user
public
getCurrentUser() : User|null
Tags
Return values
User|nullgetCurrentUserId()
Returns current users id
public
getCurrentUserId() : int|null
Return values
int|nullisUserLoggedIn()
Checks if there is a user logged in the session
public
isUserLoggedIn() : bool
Return values
boollogout()
Logs out current user
public
logout() : void