Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/auth/none/auth.php
Go to the documentation of this file.
00001 <?php
00002 
00015 if (!defined('MOODLE_INTERNAL')) {
00016     die('Direct access to this script is forbidden.');    
00017 }
00018 
00019 require_once($CFG->libdir.'/authlib.php');
00020 
00024 class auth_plugin_none extends auth_plugin_base {
00025 
00029     function auth_plugin_none() {
00030         $this->authtype = 'none';
00031         $this->config = get_config('auth/none');
00032     }
00033 
00042     function user_login ($username, $password) {
00043         global $CFG, $DB;
00044         if ($user = $DB->get_record('user', array('username'=>$username, 'mnethostid'=>$CFG->mnet_localhost_id))) {
00045             return validate_internal_user_password($user, $password);
00046         }
00047         return true;
00048     }
00049 
00060     function user_update_password($user, $newpassword) {
00061         $user = get_complete_user_data('id', $user->id);
00062         return update_internal_user_password($user, $newpassword);
00063     }
00064 
00065     function prevent_local_passwords() {
00066         return false;
00067     }
00068 
00074     function is_internal() {
00075         return true;
00076     }
00077 
00084     function can_change_password() {
00085         return true;
00086     }
00087 
00094     function change_password_url() {
00095         return null;
00096     }
00097 
00103     function can_reset_password() {
00104         return true;
00105     }
00106 
00115     function config_form($config, $err, $user_fields) {
00116         include "config.html";
00117     }
00118 
00122     function process_config($config) {
00123         return true;
00124     }
00125 
00126 }
00127 
00128 
 All Data Structures Namespaces Files Functions Variables Enumerations