From e68cf1b3e91a3faaaa6448b9580213d07dcdc9a9 Mon Sep 17 00:00:00 2001 From: defacer Date: Sat, 28 Jan 2006 19:49:16 +0000 Subject: [PATCH] Merging from STABLE: Fix for bug 4627: Hide "change password" link in admin block if the user is restricted. Not a security issue, as the script doesn't allow you to change your password even if you go there by typing in the URL. Credits for report & patch go to Joseph Rezeau. --- blocks/admin/block_admin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blocks/admin/block_admin.php b/blocks/admin/block_admin.php index 3f15695e9a3..36f754827b9 100644 --- a/blocks/admin/block_admin.php +++ b/blocks/admin/block_admin.php @@ -194,10 +194,10 @@ class block_admin extends block_list { } $this->content->icons[]=''; - if (is_internal_auth()) { + if (is_internal_auth() && !is_restricted_user($USER->username)) { $this->content->items[]=''.get_string('changepassword').''; $this->content->icons[]=''; - } else if ($CFG->changepassword) { + } else if ($CFG->changepassword && !is_restricted_user($USER->username)) { $this->content->items[]=''.get_string('changepassword').''; $this->content->icons[]=''; }