|
Elgg
Version 6.3
|
Session manager. More...
Public Member Functions | |
| __construct (protected \ElggSession $session, protected EventsService $events, protected Translator $translator, protected PersistentLoginService $persistent_login, protected AccessCache $access_cache, protected EntityCache $entity_cache) | |
| Constructor. More... | |
| getIgnoreAccess () | |
| Get current ignore access setting. More... | |
| setIgnoreAccess (bool $ignore=true) | |
| Set ignore access. More... | |
| getDisabledEntityVisibility () | |
| Are disabled entities shown? More... | |
| setDisabledEntityVisibility (bool $show=true) | |
| Include disabled entities in queries. More... | |
| getDeletedEntityVisibility () | |
| Are deleted entities shown? More... | |
| setDeletedEntityVisibility (bool $show=true) | |
| Include deleted entities in queries. More... | |
| setUserToken (?\ElggUser $user=null) | |
| Set a user specific token in the session for the currently logged-in user. More... | |
| validateUserToken (\ElggUser $user) | |
| Validate the user token stored in the session. More... | |
| login (\ElggUser $user, bool $persistent=false) | |
| Log in a user. More... | |
| logout () | |
| Log the current user out. More... | |
| setLoggedInUser (\ElggUser $user, ?bool $migrate=null) | |
| Sets the logged-in user. More... | |
| getLoggedInUser () | |
| Gets the logged-in user. More... | |
| getLoggedInUserGuid () | |
| Return the current logged-in user by guid. More... | |
| isAdminLoggedIn () | |
| Returns whether the viewer is currently logged-in and an admin user. More... | |
| isLoggedIn () | |
| Returns whether the user is currently logged-in. More... | |
| removeLoggedInUser () | |
| Remove the logged-in user. More... | |
Protected Member Functions | |
| generateUserToken (\ElggUser $user) | |
| Generate a token for a specific user. More... | |
Protected Attributes | |
| bool | $ignore_access = false |
| ElggUser | $logged_in_user = null |
| bool | $show_disabled_entities = false |
| bool | $show_deleted_entities = false |
| Elgg\SessionManagerService::__construct | ( | protected \ElggSession | $session, |
| protected EventsService | $events, | ||
| protected Translator | $translator, | ||
| protected PersistentLoginService | $persistent_login, | ||
| protected AccessCache | $access_cache, | ||
| protected EntityCache | $entity_cache | ||
| ) |
Constructor.
| \ElggSession | $session | the current session |
| EventsService | $events | the events service |
| Translator | $translator | the translator service |
| PersistentLoginService | $persistent_login | the persistent login service |
| AccessCache | $access_cache | the access cache |
| EntityCache | $entity_cache | the entity cache |
Definition at line 36 of file SessionManagerService.php.
|
protected |
Generate a token for a specific user.
| \ElggUser | $user | the user to generate the token for |
Definition at line 165 of file SessionManagerService.php.
| Elgg\SessionManagerService::getDeletedEntityVisibility | ( | ) |
Are deleted entities shown?
Definition at line 98 of file SessionManagerService.php.
| Elgg\SessionManagerService::getDisabledEntityVisibility | ( | ) |
| Elgg\SessionManagerService::getIgnoreAccess | ( | ) |
Get current ignore access setting.
Definition at line 51 of file SessionManagerService.php.
| Elgg\SessionManagerService::getLoggedInUser | ( | ) |
Gets the logged-in user.
Definition at line 301 of file SessionManagerService.php.
| Elgg\SessionManagerService::getLoggedInUserGuid | ( | ) |
Return the current logged-in user by guid.
Definition at line 310 of file SessionManagerService.php.
| Elgg\SessionManagerService::isAdminLoggedIn | ( | ) |
Returns whether the viewer is currently logged-in and an admin user.
Definition at line 320 of file SessionManagerService.php.
| Elgg\SessionManagerService::isLoggedIn | ( | ) |
Returns whether the user is currently logged-in.
Definition at line 331 of file SessionManagerService.php.
| Elgg\SessionManagerService::login | ( | \ElggUser | $user, |
| bool | $persistent = false |
||
| ) |
Log in a user.
| \ElggUser | $user | A valid Elgg user object |
| boolean | $persistent | Should this be a persistent login? |
| LoginException |
Definition at line 184 of file SessionManagerService.php.
| Elgg\SessionManagerService::logout | ( | ) |
Log the current user out.
Definition at line 241 of file SessionManagerService.php.
| Elgg\SessionManagerService::removeLoggedInUser | ( | ) |
Remove the logged-in user.
Definition at line 341 of file SessionManagerService.php.
| Elgg\SessionManagerService::setDeletedEntityVisibility | ( | bool | $show = true | ) |
Include deleted entities in queries.
| bool | $show | Visibility status |
Definition at line 110 of file SessionManagerService.php.
| Elgg\SessionManagerService::setDisabledEntityVisibility | ( | bool | $show = true | ) |
Include disabled entities in queries.
| bool | $show | Visibility status |
Definition at line 85 of file SessionManagerService.php.
| Elgg\SessionManagerService::setIgnoreAccess | ( | bool | $ignore = true | ) |
Set ignore access.
| bool | $ignore | Ignore access |
Definition at line 62 of file SessionManagerService.php.
| Elgg\SessionManagerService::setLoggedInUser | ( | \ElggUser | $user, |
| ?bool | $migrate = null |
||
| ) |
Sets the logged-in user.
| \ElggUser | $user | The user who is logged-in |
| bool | null | $migrate | Migrate the session (default: !\Elgg\Application::isCli()) |
Definition at line 275 of file SessionManagerService.php.
| Elgg\SessionManagerService::setUserToken | ( | ?\ElggUser | $user = null | ) |
Set a user specific token in the session for the currently logged-in user.
This will invalidate the session on a password change of the logged-in user
| null | \ElggUser | $user | the user to set the token for (default: logged-in user) |
Definition at line 127 of file SessionManagerService.php.
| Elgg\SessionManagerService::validateUserToken | ( | \ElggUser | $user | ) |
Validate the user token stored in the session.
| \ElggUser | $user | the user to check for |
Definition at line 148 of file SessionManagerService.php.
|
protected |
Definition at line 18 of file SessionManagerService.php.
|
protected |
Definition at line 20 of file SessionManagerService.php.
|
protected |
Definition at line 24 of file SessionManagerService.php.
|
protected |
Definition at line 22 of file SessionManagerService.php.