|
Elgg
Version 2.3
|
Go to the source code of this file.
Namespaces | |
| Elgg\Core | |
| Activate a plugin or plugins. | |
Functions | |
| get_user_entity_as_row ($guid) | |
| Return the user specific details of a user by a row. More... | |
| disable_user_entities ($owner_guid) | |
| Disables all of a user's entities. More... | |
| ban_user ($user_guid, $reason="") | |
| Ban a user. More... | |
| unban_user ($user_guid) | |
| Unban a user. More... | |
| make_user_admin ($user_guid) | |
| Makes user $guid an admin. More... | |
| remove_user_admin ($user_guid) | |
| Removes user $guid's admin flag. More... | |
| get_user ($guid) | |
| Get a user object from a GUID. More... | |
| get_user_by_username ($username) | |
| Get user by username. More... | |
| get_user_by_code ($hash) | |
| Get user by persistent login password. More... | |
| get_user_by_email ($email) | |
| Get an array of users from an email address. More... | |
| find_active_users ($options=array(), $limit=10, $offset=0, $count=false) | |
| Return users (or the number of them) who have been active within a recent period. More... | |
| send_new_password_request ($user_guid) | |
| Generate and send a password request email to a given user's registered email address. More... | |
| force_user_password_reset ($user_guid, $password) | |
| Low level function to reset a given user's password. More... | |
| execute_new_password_request ($user_guid, $conf_code, $password=null) | |
| Validate and change password for a user. More... | |
| generate_random_cleartext_password () | |
| Generate a random 12 character clear text password. More... | |
| validate_username ($username) | |
| Simple function which ensures that a username contains only valid characters. More... | |
| validate_password ($password) | |
| Simple validation of a password. More... | |
| validate_email_address ($address) | |
| Simple validation of a email. More... | |
| register_user ($username, $password, $name, $email, $allow_multiple_emails=false) | |
| Registers a user, returning false if the username already exists. More... | |
| generate_invite_code ($username) | |
| Generates a unique invite code for a user. More... | |
| elgg_validate_invite_code ($username, $code) | |
| Validate a user's invite code. More... | |
| elgg_set_user_validation_status ($user_guid, $status, $method='') | |
| Set the validation status for a user. More... | |
| elgg_get_user_validation_status ($user_guid) | |
| Gets the validation status of a user. More... | |
| elgg_user_account_page_handler ($page_elements, $handler) | |
| Page handler for account related pages. More... | |
| elgg_get_registration_url (array $query=[], $fragment='') | |
| Returns site's registration URL Triggers a 'registration_url', 'site' plugin hook that can be used by plugins to alter the default registration URL and append query elements, such as an invitation code and inviting user's guid. More... | |
| elgg_get_login_url (array $query=[], $fragment='') | |
| Returns site's login URL Triggers a 'login_url', 'site' plugin hook that can be used by plugins to alter the default login URL. More... | |
| set_last_action ($user_guid) | |
| Sets the last action time of the given user to right now. More... | |
| set_last_login ($user_guid) | |
| Sets the last logon time of the given user to right now. More... | |
| user_create_hook_add_site_relationship ($event, $object_type, $object) | |
| Creates a relationship between this site and the user. More... | |
| user_avatar_hook ($hook, $entity_type, $returnvalue, $params) | |
| Serves the user's avatar. More... | |
| elgg_user_hover_menu ($hook, $type, $return, $params) | |
| Setup the default user hover menu @access private. More... | |
| elgg_users_setup_entity_menu ($hook, $type, $return, $params) | |
| Setup the menu shown with an entity. More... | |
| elgg_profile_fields_setup () | |
| This function loads a set of default fields into the profile, then triggers a hook letting other plugins to edit add and delete fields. More... | |
| elgg_avatar_page_handler ($page) | |
| Avatar page handler. More... | |
| elgg_profile_page_handler ($page) | |
| Profile page handler. More... | |
| users_pagesetup () | |
| Sets up user-related menu items. More... | |
| _elgg_user_set_icon_file ($hook, $type, $icon, $params) | |
| Set user icon file. More... | |
| users_init () | |
| Users initialisation function, which establishes the page handler. More... | |
| users_test ($hook, $type, $value, $params) | |
| Runs unit tests for \ElggUser. More... | |
Variables | |
| return | function (\Elgg\EventsService $events, \Elgg\HooksRegistrationService $hooks) |
| _elgg_user_set_icon_file | ( | $hook, | |
| $type, | |||
| $icon, | |||
| $params | |||
| ) |
| ban_user | ( | $user_guid, | |
$reason = "" |
|||
| ) |
| disable_user_entities | ( | $owner_guid | ) |
| elgg_avatar_page_handler | ( | $page | ) |
| elgg_get_login_url | ( | array | $query = [], |
$fragment = '' |
|||
| ) |
| elgg_get_registration_url | ( | array | $query = [], |
$fragment = '' |
|||
| ) |
Returns site's registration URL Triggers a 'registration_url', 'site' plugin hook that can be used by plugins to alter the default registration URL and append query elements, such as an invitation code and inviting user's guid.
| array | $query | An array of query elements |
| string | $fragment | Fragment identifier |
| elgg_get_user_validation_status | ( | $user_guid | ) |
| elgg_profile_fields_setup | ( | ) |
This function loads a set of default fields into the profile, then triggers a hook letting other plugins to edit add and delete fields.
Note: This is a secondary system:init call and is run at a super low priority to guarantee that it is called after all other plugins have initialised. @access private
| elgg_profile_page_handler | ( | $page | ) |
| elgg_set_user_validation_status | ( | $user_guid, | |
| $status, | |||
$method = '' |
|||
| ) |
| elgg_user_account_page_handler | ( | $page_elements, | |
| $handler | |||
| ) |
| elgg_user_hover_menu | ( | $hook, | |
| $type, | |||
| $return, | |||
| $params | |||
| ) |
| elgg_users_setup_entity_menu | ( | $hook, | |
| $type, | |||
| $return, | |||
| $params | |||
| ) |
| elgg_validate_invite_code | ( | $username, | |
| $code | |||
| ) |
Validate a user's invite code.
| string | $username | The username |
| string | $code | The invite code |
| execute_new_password_request | ( | $user_guid, | |
| $conf_code, | |||
$password = null |
|||
| ) |
| find_active_users | ( | $options = array(), |
|
$limit = 10, |
|||
$offset = 0, |
|||
$count = false |
|||
| ) |
Return users (or the number of them) who have been active within a recent period.
| array | $options | Array of options with keys: |
seconds (int) => Length of period (default 600 = 10min) limit (int) => Limit (default from settings) offset (int) => Offset (default 0) count (bool) => Return a count instead of users? (default false)
Formerly this was the seconds parameter.
| int | $limit | Limit (deprecated usage, use $options) |
| int | $offset | Offset (deprecated usage, use $options) |
| bool | $count | Count (deprecated usage, use $options) |
| force_user_password_reset | ( | $user_guid, | |
| $password | |||
| ) |
Low level function to reset a given user's password.
This can only be called from execute_new_password_request().
| int | $user_guid | The user. |
| string | $password | Text (which will then be converted into a hash and stored) |
| generate_invite_code | ( | $username | ) |
Generates a unique invite code for a user.
| string | $username | The username of the user sending the invitation |
| generate_random_cleartext_password | ( | ) |
| get_user | ( | $guid | ) |
Get a user object from a GUID.
This function returns an \ElggUser from a given GUID.
| int | $guid | The GUID |
| get_user_by_code | ( | $hash | ) |
| get_user_by_email | ( | ) |
| get_user_by_username | ( | $username | ) |
| get_user_entity_as_row | ( | $guid | ) |
| make_user_admin | ( | $user_guid | ) |
| register_user | ( | $username, | |
| $password, | |||
| $name, | |||
| $email, | |||
$allow_multiple_emails = false |
|||
| ) |
Registers a user, returning false if the username already exists.
| string | $username | The username of the new user |
| string | $password | The password |
| string | $name | The user's display name |
| string | The user's email address | |
| bool | $allow_multiple_emails | Allow the same email address to be registered multiple times? |
| RegistrationException |
| remove_user_admin | ( | $user_guid | ) |
| send_new_password_request | ( | $user_guid | ) |
| set_last_action | ( | $user_guid | ) |
| set_last_login | ( | $user_guid | ) |
| unban_user | ( | $user_guid | ) |
| user_avatar_hook | ( | $hook, | |
| $entity_type, | |||
| $returnvalue, | |||
| $params | |||
| ) |
| user_create_hook_add_site_relationship | ( | $event, | |
| $object_type, | |||
| $object | |||
| ) |
| users_init | ( | ) |
| users_pagesetup | ( | ) |
| users_test | ( | $hook, | |
| $type, | |||
| $value, | |||
| $params | |||
| ) |
| validate_email_address | ( | $address | ) |
Simple validation of a email.
| string | $address | Email address |
| RegistrationException | on invalid |
| validate_password | ( | $password | ) |
Simple validation of a password.
| string | $password | Clear text password |
| RegistrationException | on invalid |
| validate_username | ( | $username | ) |
Simple function which ensures that a username contains only valid characters.
This should only permit chars that are valid on the file system as well.
| string | $username | Username |
| RegistrationException | on invalid |
| return function(\Elgg\EventsService $events, \Elgg\HooksRegistrationService $hooks) | ( | \Elgg\EventsService | $events, |
| \Elgg\HooksRegistrationService | $hooks | ||
| ) |