Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 402] [Versions 400 and 403]

Auth external API

Copyright: 2016 Juan Leyva <juan@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 430 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


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.

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

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.

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

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.

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

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.

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

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

return: external_single_structure