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.

Class: core_auth_external  - X-Ref

Auth external functions

confirm_user_parameters()   X-Ref
Describes the parameters for confirm_user.

return: external_function_parameters

confirm_user($username, $secret)   X-Ref
Confirm a user account.

param: string $username user name
param: string $secret   confirmation secret (random string) used for validating the confirm request
return: array warnings and success status (true if the user was confirmed, false if he was already confirmed)

confirm_user_returns()   X-Ref
Describes the confirm_user return value.

return: external_single_structure

request_password_reset_parameters()   X-Ref
Describes the parameters for request_password_reset.

return: external_function_parameters

request_password_reset($username = '', $email = '')   X-Ref
Requests a password reset.

param: string $username user name
param: string $email    user email
return: array warnings and success status (including notices and errors while processing)

request_password_reset_returns()   X-Ref
Describes the request_password_reset return value.

return: external_single_structure

is_minor_parameters()   X-Ref
Describes the parameters for the digital minor check.

return: external_function_parameters

is_minor($age, $country)   X-Ref
Requests a check if a user is digital minor.

param: int $age User age
param: string $country Country of residence
return: array status (true if the user is a minor, false otherwise)

is_minor_returns()   X-Ref
Describes the is_minor return value.

return: external_single_structure

is_age_digital_consent_verification_enabled_parameters()   X-Ref
Describes the parameters for is_age_digital_consent_verification_enabled.

return: external_function_parameters

is_age_digital_consent_verification_enabled()   X-Ref
Checks if age digital consent verification is enabled.

return: array status (true if digital consent verification is enabled, false otherwise.)

is_age_digital_consent_verification_enabled_returns()   X-Ref
Describes the is_age_digital_consent_verification_enabled return value.

return: external_single_structure

resend_confirmation_email_parameters()   X-Ref
Describes the parameters for resend_confirmation_email.

return: external_function_parameters

resend_confirmation_email($username, $password, $redirect = '')   X-Ref
Requests resend the confirmation email.

param: string $username user name
param: string $password plain text password
param: string $redirect redirect the user to this site url after confirmation
return: array warnings and success status

resend_confirmation_email_returns()   X-Ref
Describes the resend_confirmation_email return value.

return: external_single_structure