Small upgrade to fix some guest->mnethostid. MDL-10375
[pfb-moodle.git] / auth / nologin / auth.php
blob9107059367365a7a7eea42077fa91e067a49deb9
1 <?php
3 /**
4 * @author Petr Skoda
5 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
6 * @package moodle multiauth
8 * Authentication Plugin: No Authentication
10 * No authentication at all. This method approves everything!
12 * 2007-02-18 File created.
15 if (!defined('MOODLE_INTERNAL')) {
16 die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
19 require_once($CFG->libdir.'/authlib.php');
21 /**
22 * Plugin for no authentication - disabled user.
24 class auth_plugin_nologin extends auth_plugin_base {
27 /**
28 * Constructor.
30 function auth_plugin_nologin() {
31 $this->authtype = 'nologin';
34 /**
35 * Do not allow any login.
38 function user_login($username, $password) {
39 return false;
42 /**
43 * No password updates.
45 function user_update_password($user, $newpassword) {
46 return false;
49 /**
50 * No external data sync.
52 * @return bool
54 function is_internal() {
55 //we do not know if it was internal or external originally
56 return true;
59 /**
60 * No changing of password.
62 * @return bool
64 function can_change_password() {
65 return false;
68 /**
69 * No password resetting.
71 function can_reset_password() {
72 return false;