From ea62f50ea7873ba5a91ebdf12f2d19b30782fe10 Mon Sep 17 00:00:00 2001 From: skodak Date: Thu, 24 Jul 2008 23:14:09 +0000 Subject: [PATCH] MDL-15821 do not show profile link in admin block if using guest account --- blocks/admin/block_admin.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/blocks/admin/block_admin.php b/blocks/admin/block_admin.php index 74676b3299a..17af3a4bb42 100644 --- a/blocks/admin/block_admin.php +++ b/blocks/admin/block_admin.php @@ -217,9 +217,11 @@ class block_admin extends block_list { } } - /// Link to the user own profile - $this->content->items[]=''.get_string('profile').''; - $this->content->icons[]=''; + /// Link to the user own profile (except guests) + if (!isguestuser() and isloggedin()) { + $this->content->items[]=''.get_string('profile').''; + $this->content->icons[]=''; + } return $this->content; }