* @return bool
*/
function is_internal() {
+ if (!isset($this->config->passtype)) {
+ return true;
+ }
return ($this->config->passtype == 'internal');
}
--- /dev/null
+<?php
+
+function xmldb_auth_db_install() {
+ global $CFG, $DB;
+
+ // upgrade from 1.9.x, introducing version.php
+
+ // remove cached passwords, we do not need them for this plugin, but only if internal
+ $type = get_config('auth/db', 'passtype');
+ if ($type and $type !== 'internal') {
+ $DB->set_field('user', 'password', 'not cached', array('auth'=>'db'));
+ }
+
+}
--- /dev/null
+<?php
+
+$plugin->version = 2009112400;
--- /dev/null
+<?php
+
+function xmldb_auth_fc_install() {
+ global $CFG, $DB;
+
+ // upgrade from 1.9.x, introducing version.php
+
+ // remove cached passwords, we do not need them for this plugin
+ $DB->set_field('user', 'password', 'not cached', array('auth'=>'fc'));
+
+}
--- /dev/null
+<?php
+
+$plugin->version = 2009112400;
--- /dev/null
+<?php
+
+function xmldb_auth_imap_install() {
+ global $CFG, $DB;
+
+ // upgrade from 1.9.x, introducing version.php
+
+ // remove cached passwords, we do not need them for this plugin
+ $DB->set_field('user', 'password', 'not cached', array('auth'=>'imap'));
+
+}
--- /dev/null
+<?php
+
+$plugin->version = 2009112400;