2 // This file is part of Moodle - http://moodle.org/
4 // Moodle is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // Moodle is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 * Nologin authentication login - prevents user login.
20 * @package auth_nologin
22 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
25 defined('MOODLE_INTERNAL') ||
die();
27 require_once($CFG->libdir
.'/authlib.php');
30 * Plugin for no authentication - disabled user.
32 class auth_plugin_nologin
extends auth_plugin_base
{
38 public function __construct() {
39 $this->authtype
= 'nologin';
43 * Old syntax of class constructor for backward compatibility.
45 public function auth_plugin_nologin() {
50 * Do not allow any login.
53 function user_login($username, $password) {
58 * No password updates.
60 function user_update_password($user, $newpassword) {
64 function prevent_local_passwords() {
65 // just in case, we do not want to loose the passwords
70 * No external data sync.
74 function is_internal() {
75 //we do not know if it was internal or external originally
80 * No changing of password.
84 function can_change_password() {
89 * No password resetting.
91 function can_reset_password() {
96 * Returns true if plugin can be manually set.
100 function can_be_manually_set() {