[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
1 <?php 2 // This file is part of Moodle - http://moodle.org/ 3 // 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. 8 // 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. 13 // 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/>. 16 17 /** 18 * Nologin authentication login - prevents user login. 19 * 20 * @package auth_nologin 21 * @author Petr Skoda 22 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License 23 */ 24 25 defined('MOODLE_INTERNAL') || die(); 26 27 require_once($CFG->libdir.'/authlib.php'); 28 29 /** 30 * Plugin for no authentication - disabled user. 31 */ 32 class auth_plugin_nologin extends auth_plugin_base { 33 34 35 /** 36 * Constructor. 37 */ 38 function auth_plugin_nologin() { 39 $this->authtype = 'nologin'; 40 } 41 42 /** 43 * Do not allow any login. 44 * 45 */ 46 function user_login($username, $password) { 47 return false; 48 } 49 50 /** 51 * No password updates. 52 */ 53 function user_update_password($user, $newpassword) { 54 return false; 55 } 56 57 function prevent_local_passwords() { 58 // just in case, we do not want to loose the passwords 59 return false; 60 } 61 62 /** 63 * No external data sync. 64 * 65 * @return bool 66 */ 67 function is_internal() { 68 //we do not know if it was internal or external originally 69 return true; 70 } 71 72 /** 73 * No changing of password. 74 * 75 * @return bool 76 */ 77 function can_change_password() { 78 return false; 79 } 80 81 /** 82 * No password resetting. 83 */ 84 function can_reset_password() { 85 return false; 86 } 87 88 /** 89 * Returns true if plugin can be manually set. 90 * 91 * @return bool 92 */ 93 function can_be_manually_set() { 94 return true; 95 } 96 } 97 98
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |