Commit a42d292e authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie

Only show the ignore-password-change message if it actually can be ignored.

Otherwise, the user sees the message no matter what when forced to change their password, which looks stupid.
parent 1eb44162
......@@ -820,9 +820,11 @@ function auth_check_password_change() {
$smarty = smarty();
$smarty->assign('change_password_form', pieform($form));
$smarty->assign('loginasoverridepasswordchange',
get_string('loginasoverridepasswordchange', 'admin',
'<a href="' . get_config('wwwroot') . '?loginanyway">', '</a>'));
if ($USER->get('parentuser')) {
$smarty->assign('loginasoverridepasswordchange',
get_string('loginasoverridepasswordchange', 'admin',
'<a href="' . get_config('wwwroot') . '?loginanyway">', '</a>'));
}
$smarty->display('change_password.tpl');
exit;
}
......
......@@ -6,7 +6,7 @@
<p>{str tag="changepasswordinfo"}</p>
<div class="message">{$loginasoverridepasswordchange}</div>
{if $loginasoverridepasswordchange}<div class="message">{$loginasoverridepasswordchange}</div>{/if}
{$change_password_form}
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment