Skip to content

Commit

Permalink
"MDL-24032, fixed error when use bulk force password change, credits …
Browse files Browse the repository at this point in the history
…to Myles Carrick"
  • Loading branch information
Dongsheng Cai committed Sep 8, 2010
1 parent 81da691 commit ac3c1e5
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions admin/user/user_bulk_forcepasswordchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit ac3c1e5

Please sign in to comment.