Elgg
Version 3.0
|
Go to the source code of this file.
Namespaces | |
Elgg\Core | |
Updates the advanced settings for the primary site object. | |
Functions | |
disable_user_entities ($owner_guid) | |
Disables all of a user's entities. 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 (array $options=[]) | |
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, $subtype=null) | |
Registers a user, returning false if the username already exists. More... | |
elgg_validate_registration_data ($username, $password, $name, $email, $allow_multiple_emails=false) | |
Assert that given registration details are valid and can be used to register the user. 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_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... | |
elgg_user_hover_menu ($hook, $type, $return, $params) | |
Setup the default user hover menu. More... | |
_elgg_user_title_menu (\Elgg\Hook $hook) | |
Adds avatar edit button to title menu. More... | |
_elgg_user_page_menu ($hook, $type, $return, $params) | |
Register menu items for the page menu. More... | |
_elgg_user_topbar_menu ($hook, $type, $return, $params) | |
Register menu items for the topbar menu. More... | |
_elgg_user_set_icon_file ($hook, $type, $icon, $params) | |
Set user icon file. More... | |
_elgg_user_get_subscriber_unban_action ($hook, $type, $return_value, $params) | |
Add the user to the subscribers when (un)banning the account. More... | |
_elgg_user_ban_notification ($event, $type, $user) | |
Send a notification to the user that the account was banned. More... | |
_elgg_user_prepare_unban_notification ($hook, $type, $return_value, $params) | |
Prepare the notification content for the user being unbanned. More... | |
_elgg_user_unvalidated_menu (\Elgg\Hook $hook) | |
Register menu items to the user:unvalidated menu. More... | |
users_init () | |
Users initialisation function, which establishes the page handler. More... | |
Variables | |
return | function (\Elgg\EventsService $events,\Elgg\HooksRegistrationService $hooks) |
_elgg_user_ban_notification | ( | $event, | |
$type, | |||
$user | |||
) |
Send a notification to the user that the account was banned.
Note: this can't be handled by the delayed notification system as it won't send notifications to banned users
string | $event | 'ban' |
string | $type | 'user' |
\ElggUser | $user | the user being banned |
_elgg_user_get_subscriber_unban_action | ( | $hook, | |
$type, | |||
$return_value, | |||
$params | |||
) |
_elgg_user_page_menu | ( | $hook, | |
$type, | |||
$return, | |||
$params | |||
) |
_elgg_user_prepare_unban_notification | ( | $hook, | |
$type, | |||
$return_value, | |||
$params | |||
) |
_elgg_user_set_icon_file | ( | $hook, | |
$type, | |||
$icon, | |||
$params | |||
) |
_elgg_user_title_menu | ( | \Elgg\Hook | $hook | ) |
_elgg_user_topbar_menu | ( | $hook, | |
$type, | |||
$return, | |||
$params | |||
) |
_elgg_user_unvalidated_menu | ( | \Elgg\Hook | $hook | ) |
disable_user_entities | ( | $owner_guid | ) |
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_user_hover_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 |
elgg_validate_registration_data | ( | $username, | |
$password, | |||
$name, | |||
$email, | |||
$allow_multiple_emails = false |
|||
) |
Assert that given registration details are valid and can be used to register the user.
string | $username | The username of the new user |
string | array | $password | The password Can be an array [$password, $confirm_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? |
execute_new_password_request | ( | $user_guid, | |
$conf_code, | |||
$password = null |
|||
) |
find_active_users | ( | array | $options = [] | ) |
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)
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_user_by_code | ( | $hash | ) |
get_user_by_email | ( | ) |
get_user_by_username | ( | $username | ) |
register_user | ( | $username, | |
$password, | |||
$name, | |||
$email, | |||
$allow_multiple_emails = false , |
|||
$subtype = null |
|||
) |
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? |
string | $subtype | Subtype of the user entity |
RegistrationException |
send_new_password_request | ( | $user_guid | ) |
users_init | ( | ) |
validate_email_address | ( | $address | ) |
Simple validation of a email.
string | $address | Email address |
RegistrationException |
validate_password | ( | $password | ) |
Simple validation of a password.
string | $password | Clear text password |
RegistrationException |
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 |
return function(\Elgg\EventsService $events,\Elgg\HooksRegistrationService $hooks) |