Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.
/login/ -> lib.php (source)

Functions that are not part of a class:

core_login_process_password_reset_request()   X-Ref
Processes a user's request to set a new password in the event they forgot the old one.
If no user identifier has been supplied, it displays a form where they can submit their identifier.
Where they have supplied identifier, the function will check their status, and send email as appropriate.


core_login_process_password_reset($username, $email)   X-Ref
Process the password reset for the given user (via username or email).

param: string $username the user name
param: string $email    the user email
return: array an array containing fields indicating the reset status, a info notice and redirect URL.

core_login_process_password_set($token)   X-Ref
This function processes a user's submitted token to validate the request to set a new password.
If the user's token is validated, they are prompted to set a new password.

param: string $token the one-use identifier which should verify the password reset request as being valid.
return: void

core_login_generate_password_reset($user)   X-Ref
No description

core_login_get_return_url()   X-Ref
No description

core_login_validate_forgot_password_data($data)   X-Ref
Validates the forgot password form data.

This is used by the forgot_password_form and by the core_auth_request_password_rest WS.
param: array $data array containing the data to be validated (email and username)
return: array array of errors compatible with mform

core_login_pre_signup_requests()   X-Ref
Plugins can create pre sign up requests.


core_login_extend_change_password_form($mform, $user)   X-Ref
No description

core_login_extend_set_password_form($mform, $user)   X-Ref
No description

core_login_extend_forgot_password_form($mform)   X-Ref
No description

core_login_extend_signup_form($mform)   X-Ref
No description

core_login_validate_extend_change_password_form($data, $user)   X-Ref
No description

core_login_validate_extend_set_password_form($data, $user)   X-Ref
No description

core_login_validate_extend_forgot_password_form($data)   X-Ref
No description

core_login_validate_extend_signup_form($data)   X-Ref
No description

core_login_post_change_password_requests($data)   X-Ref
No description

core_login_post_set_password_requests($data, $user)   X-Ref
No description

core_login_post_forgot_password_requests($data)   X-Ref
No description

core_login_post_signup_requests($data)   X-Ref
No description