From ac3c1e554ab22e8531742498a95670a3a98ae437 Mon Sep 17 00:00:00 2001 From: Dongsheng Cai Date: Wed, 8 Sep 2010 13:50:26 +0000 Subject: [PATCH] "MDL-24032, fixed error when use bulk force password change, credits to Myles Carrick" --- admin/user/user_bulk_forcepasswordchange.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/admin/user/user_bulk_forcepasswordchange.php b/admin/user/user_bulk_forcepasswordchange.php index c47b44e001ace..6988c741c0c0b 100644 --- a/admin/user/user_bulk_forcepasswordchange.php +++ b/admin/user/user_bulk_forcepasswordchange.php @@ -23,14 +23,15 @@ if ($confirm and confirm_sesskey()) { // only force password change if user may actually change the password - $authsavailable = get_plugin_list('auth'); + $authsavailable = get_enabled_auth_plugins(); $changeable = array(); - foreach($authsavailable as $authname=>$path) { - if (!$auth = get_auth_plugin($authname)) { + + foreach($authsavailable as $authplugin) { + if (!$auth = get_auth_plugin($authplugin)) { continue; } if ($auth->is_internal() and $auth->can_change_password()) { - $changeable[$authname] = true; + $changeable[$authplugin] = true; } } @@ -60,8 +61,8 @@ $usernames .= ', ...'; } echo $OUTPUT->heading(get_string('confirmation', 'admin')); - $formcontinue = new single_button(new moodle_url('user_bulk_forcepasswordchange.php', array('confirm' => 1)), get_string('yes')); - $formcancel = new single_button('user_bulk.php', get_string('no'), 'get'); + $formcontinue = new single_button(new moodle_url('/admin/user/user_bulk_forcepasswordchange.php', array('confirm' => 1)), get_string('yes')); + $formcancel = new single_button(new moodle_url('/admin/user/user_bulk.php'), get_string('no'), 'get'); echo $OUTPUT->confirm(get_string('forcepasswordchangecheckfull', '', $usernames), $formcontinue, $formcancel); }