$this->config->objectclass = 'objectClass='.$this->config->objectclass;
}
}
+
+ function prevent_local_passwords() {
+ return true;
+ }
+
/**
* Authenticates user againt CAS
* Returns true if the username and password work and false if they are
}
}
+ function prevent_local_passwords() {
+ if (!isset($this->config->passtype)) {
+ return false;
+ }
+ return ($this->config->passtype != 'internal');
+ }
+
/**
* Returns true if this authentication plugin is 'internal'.
*
}
}
+ function prevent_local_passwords() {
+ return false;
+ }
+
/**
* Returns true if this authentication plugin is 'internal'.
*
return false;
}
+ function prevent_local_passwords() {
+ return true;
+ }
+
/**
* Returns true if this authentication plugin is 'internal'.
*
return false; // No match
}
+ function prevent_local_passwords() {
+ return true;
+ }
+
/**
* Returns true if this authentication plugin is 'internal'.
*
return ($fresult);
}
+ function prevent_local_passwords() {
+ return !empty($this->config->preventpassindb);
+ }
+
/**
* Returns true if this authentication plugin is 'internal'.
*
if (!isset($config->opt_deref))
{ $config->opt_deref = LDAP_DEREF_NEVER; }
if (!isset($config->preventpassindb))
- { $config->preventpassindb = 0; }
+ { $config->preventpassindb = 1; }
if (!isset($config->bind_dn))
{$config->bind_dn = ''; }
if (!isset($config->bind_pw))
return update_internal_user_password($user, $newpassword);
}
+ function prevent_local_passwords() {
+ return false;
+ }
+
/**
* Returns true if this authentication plugin is 'internal'.
*
$DB->delete_records_select('mnet_enrol_assignments', $whereclause, array($userid, $MNET_REMOTE_CLIENT->id));
}
+ function prevent_local_passwords() {
+ return true;
+ }
+
/**
* Returns true if this authentication plugin is 'internal'.
*
return false;
}
+ function prevent_local_passwords() {
+ return true;
+ }
+
/**
* Returns true if this authentication plugin is 'internal'.
*
return false;
}
+ function prevent_local_passwords() {
+ // just in case, we do not want to loose the passwords
+ return false;
+ }
+
/**
* No external data sync.
*
return update_internal_user_password($user, $newpassword);
}
+ function prevent_local_passwords() {
+ return false;
+ }
+
/**
* Returns true if this authentication plugin is 'internal'.
*
}
}
+ function prevent_local_passwords() {
+ return true;
+ }
+
/**
* Returns true if this authentication plugin is 'internal'.
*
return false; // No matches found
}
+ function prevent_local_passwords() {
+ return true;
+ }
+
/**
* Returns true if this authentication plugin is 'internal'.
*
$rauth->close();
}
+ function prevent_local_passwords() {
+ return true;
+ }
+
/**
* Returns true if this authentication plugin is 'internal'.
*
return $moodleattributes;
}
+ function prevent_local_passwords() {
+ return true;
+ }
+
/**
* Returns true if this authentication plugin is 'internal'.
*
if (!array_key_exists($user->auth, $authcache)) { // Not in cache
$userauth = new stdClass();
$authplugin = get_auth_plugin($user->auth);
- $userauth->preventpassindb = !empty($authplugin->config->preventpassindb);
+ $userauth->preventpassindb = $authplugin->prevent_local_passwords();
$userauth->isinternal = $authplugin->is_internal();
$userauth->canresetpwd = $authplugin->can_reset_password();
$authcache[$user->auth] = $userauth;
$userauth = $authcache[$user->auth]; // Get from cache
}
- // Respect strange config in some (ldap) plugins. Isn't this a dupe of is_internal() ?
+ // Most external plugins do not store passwords locally
if (!empty($userauth->preventpassindb)) {
$user->password = 'not cached';
return true;
}
+ /**
+ * Indicates if password hashes should be stored in local moodle database.
+ * @return bool true means md5 password hash stored in user table, false means flag 'not_cached' stored there instead
+ */
+ function prevent_local_passwords() {
+ // NOTE: this will be changed to true in 2.0
+ return false;
+ }
+
/**
* Updates the user's password.
*
global $CFG, $DB;
$authplugin = get_auth_plugin($user->auth);
- if (!empty($authplugin->config->preventpassindb)) {
+ if ($authplugin->prevent_local_passwords()) {
$hashedpassword = 'not cached';
} else {
$hashedpassword = hash_internal_user_password($password);