Go to the source code of this file.
Namespaces | |
| namespace | Elgg::Core |
Activate a plugin or plugins. | |
Functions | |
| elgg_get_logged_in_user_entity () | |
| Return the current logged in user, or NULL if no user is logged in. | |
| elgg_get_logged_in_user_guid () | |
| Return the current logged in user by id. | |
| elgg_is_logged_in () | |
| Returns whether or not the user is currently logged in. | |
| elgg_is_admin_logged_in () | |
| Returns whether or not the user is currently logged in and that they are an admin user. | |
| elgg_is_admin_user ($user_guid) | |
| Check if the given user has full access. | |
| elgg_authenticate ($username, $password) | |
| Perform user authentication with a given username and password. | |
| pam_auth_userpass (array $credentials=array()) | |
| Hook into the PAM system which accepts a username and password and attempts to authenticate it against a known user. | |
| log_login_failure ($user_guid) | |
| Log a failed login for $user_guid. | |
| reset_login_failure_count ($user_guid) | |
| Resets the fail login count for $user_guid. | |
| check_rate_limit_exceeded ($user_guid) | |
| Checks if the rate limit of failed logins has been exceeded for $user_guid. | |
| login (ElggUser $user, $persistent=false) | |
| Logs in a specified ElggUser. | |
| logout () | |
| Log the current user out. | |
| _elgg_session_boot () | |
| Initialises the system session and potentially logs the user in. | |
| gatekeeper () | |
| Used at the top of a page to mark it as logged in users only. | |
| admin_gatekeeper () | |
| Used at the top of a page to mark it as logged in admin or siteadmin only. | |
| _elgg_session_open ($save_path, $session_name) | |
| Handles opening a session in the DB. | |
| _elgg_session_close () | |
| Closes a session. | |
| _elgg_session_read ($id) | |
| Read the session data from DB failing back to file. | |
| _elgg_session_write ($id, $sess_data) | |
| Write session data to the DB falling back to file. | |
| _elgg_session_destroy ($id) | |
| Destroy a DB session, falling back to file. | |
| _elgg_session_gc ($maxlifetime) | |
| Perform garbage collection on session table / files. | |
Variables | |
| global | $SESSION |
| Elgg magic session. | |
| _elgg_session_boot | ( | ) |
Initialises the system session and potentially logs the user in.
This function looks for:
1. $_SESSION['id'] - if not present, we're logged out, and this is set to 0 2. The cookie 'elggperm' - if present, checks it for an authentication token, validates it, and potentially logs the user in
$_SESSION
Definition at line 378 of file sessions.php.
| _elgg_session_close | ( | ) |
| _elgg_session_destroy | ( | $ | id | ) |
Destroy a DB session, falling back to file.
| string | $id Session ID |
Definition at line 602 of file sessions.php.
| _elgg_session_gc | ( | $ | maxlifetime | ) |
Perform garbage collection on session table / files.
| int | $maxlifetime Max age of a session |
Definition at line 627 of file sessions.php.
| _elgg_session_open | ( | $ | save_path, | |
| $ | session_name | |||
| ) |
Handles opening a session in the DB.
| string | $save_path The path to save the sessions | |
| string | $session_name The name of the session |
Definition at line 500 of file sessions.php.
| _elgg_session_read | ( | $ | id | ) |
Read the session data from DB failing back to file.
| string | $id The session ID |
Definition at line 528 of file sessions.php.
| _elgg_session_write | ( | $ | id, | |
| $ | sess_data | |||
| ) |
Write session data to the DB falling back to file.
| string | $id The session ID | |
| mixed | $sess_data Session data |
Definition at line 562 of file sessions.php.
| admin_gatekeeper | ( | ) |
Used at the top of a page to mark it as logged in admin or siteadmin only.
Definition at line 480 of file sessions.php.
| check_rate_limit_exceeded | ( | $ | user_guid | ) |
Checks if the rate limit of failed logins has been exceeded for $user_guid.
| int | $user_guid User GUID |
Definition at line 248 of file sessions.php.
| elgg_authenticate | ( | $ | username, | |
| $ | password | |||
| ) |
Perform user authentication with a given username and password.
| string | $username The username | |
| string | $password The password |
Definition at line 142 of file sessions.php.
| elgg_get_logged_in_user_entity | ( | ) |
Return the current logged in user, or NULL if no user is logged in.
If no user can be found in the current session, a plugin hook - 'session:get' 'user' to give plugin authors another way to provide user details to the ACL system without touching the session.
Definition at line 23 of file sessions.php.
| elgg_get_logged_in_user_guid | ( | ) |
Return the current logged in user by id.
Definition at line 39 of file sessions.php.
| elgg_is_admin_logged_in | ( | ) |
Returns whether or not the user is currently logged in and that they are an admin user.
Definition at line 68 of file sessions.php.
| elgg_is_admin_user | ( | $ | user_guid | ) |
Check if the given user has full access.
| int | $user_guid The user to check |
Definition at line 88 of file sessions.php.
| elgg_is_logged_in | ( | ) |
Returns whether or not the user is currently logged in.
Definition at line 53 of file sessions.php.
| gatekeeper | ( | ) |
Used at the top of a page to mark it as logged in users only.
Definition at line 467 of file sessions.php.
| log_login_failure | ( | $ | user_guid | ) |
Log a failed login for $user_guid.
| int | $user_guid User GUID |
Definition at line 194 of file sessions.php.
| login | ( | ElggUser $ | user, | |
| $ | persistent = false | |||
| ) |
Logs in a specified ElggUser.
For standard registration, use in conjunction with elgg_authenticate.
| ElggUser | $user A valid Elgg user object | |
| boolean | $persistent Should this be a persistent login? |
| LoginException |
Definition at line 288 of file sessions.php.
| logout | ( | ) |
| pam_auth_userpass | ( | array $ | credentials = array() |
) |
Hook into the PAM system which accepts a username and password and attempts to authenticate it against a known user.
| array | $credentials Associated array of credentials passed to Elgg's PAM system. This function expects 'username' and 'password' (cleartext). |
| LoginException | private |
Definition at line 164 of file sessions.php.
| reset_login_failure_count | ( | $ | user_guid | ) |
Resets the fail login count for $user_guid.
| int | $user_guid User GUID |
Definition at line 217 of file sessions.php.
| global $SESSION |
Elgg magic session.
Definition at line 12 of file sessions.php.
1.6.3