Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Nologin authentication login - prevents user login.

Author: Petr Skoda
License: http://www.gnu.org/copyleft/gpl.html GNU Public License
File Size: 135 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

auth_plugin_nologin:: (2 methods):
  __construct()
  auth_plugin_nologin()

name:: (8 methods):
  user_login()
  user_update_password()
  prevent_local_passwords()
  is_internal()
  can_change_password()
  can_reset_password()
  can_be_manually_set()
  get_password_change_info()


Class: auth_plugin_nologin  - X-Ref

Plugin for no authentication - disabled user.

__construct()   X-Ref
Constructor.


auth_plugin_nologin()   X-Ref
Old syntax of class constructor. Deprecated in PHP7.


Class: name  - X-Ref

user_login($username, $password)   X-Ref
Do not allow any login.


user_update_password($user, $newpassword)   X-Ref
No password updates.


prevent_local_passwords()   X-Ref
No description

is_internal()   X-Ref
No external data sync.

return: bool

can_change_password()   X-Ref
No changing of password.

return: bool

can_reset_password()   X-Ref
No password resetting.


can_be_manually_set()   X-Ref
Returns true if plugin can be manually set.

return: bool

get_password_change_info(stdClass $user)   X-Ref
Returns information on how the specified user can change their password.
User accounts with authentication type set to nologin are disabled accounts.
They cannot change their password.

param: stdClass $user A user object
return: string[] An array of strings with keys subject and message