MDL-15821 do not show profile link in admin block if using guest account

This commit is contained in:
skodak
2008-07-24 23:14:09 +00:00
parent 6e47562d93
commit ea62f50ea7
+5 -3
View File
@@ -217,9 +217,11 @@ class block_admin extends block_list {
}
}
/// Link to the user own profile
$this->content->items[]='<a href="'.$CFG->wwwroot.'/user/view.php?id='.$USER->id.'&amp;course='.$course->id.'">'.get_string('profile').'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" alt="" />';
/// Link to the user own profile (except guests)
if (!isguestuser() and isloggedin()) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/user/view.php?id='.$USER->id.'&amp;course='.$course->id.'">'.get_string('profile').'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" alt="" />';
}
return $this->content;
}