From 45864cc86e10c843df446e5950bfb4fed99d1b2e Mon Sep 17 00:00:00 2001 From: skodak Date: Sat, 24 Feb 2007 09:49:51 +0000 Subject: [PATCH] email selfregistration enabled by default again - thanks Eloy for noticing the problem; backported from HEAD --- admin/index.php | 1 + lib/db/upgrade.php | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/admin/index.php b/admin/index.php index 4f934ce5f39..1ae53ec18bf 100644 --- a/admin/index.php +++ b/admin/index.php @@ -207,6 +207,7 @@ 'enrol' => 'manual', 'enrol_plugins_enabled' => 'manual', 'guestloginbutton' => 1, + 'registerauth' => 'email', 'style' => 'default', 'template' => 'default', 'theme' => 'standardwhite', diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index dbf48477422..595a1f0ac7a 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -133,6 +133,11 @@ function xmldb_main_upgrade($oldversion=0) { // Move the auth plugin settings into the config_plugin table if ($oldversion < 2007010300) { + if ($CFG->auth == 'email') { + set_config('registerauth', 'email'); + } else { + set_config('registerauth', ''); + } $authplugins = get_list_of_plugins('auth'); foreach ($CFG as $k => $v) { if (strpos($k, 'auth_') !== 0) {