Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

(no description)

File Size: 121 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

verification_field:: (3 methods):
  __construct()
  toHtml()
  secure_js()


Class: verification_field  - X-Ref

MFA Verification code element.

__construct($attributes = null, $auth = true)   X-Ref
Verification field is a text entry box that features some useful extras.

Contains JS to autosubmit the auth page when code is entered, as well as additional styling.

param: array $attributes
param: boolean $auth is this constructed in auth.php loginform_* definitions. Set to false to prevent autosubmission of form.

toHtml()   X-Ref
Returns HTML for this form element.

return: string

secure_js()   X-Ref
Setup and return the script for autosubmission while inside the secure layout.

return: string the JS to inline attach to the rendered object.