Permalink
Browse files

Hide password and unenrolment buttons from guest users

  • Loading branch information...
moodler
moodler committed Nov 22, 2002
1 parent 9271022 commit bcd6e7184fedcce0fdeae41a82b2e5e78e704820
Showing with 2 additions and 2 deletions.
  1. +2 −2 user/view.php
View
@@ -123,13 +123,13 @@
// Print other functions
echo "<CENTER><TABLE ALIGN=CENTER><TR>";
- if ($user->id == $USER->id) {
+ if ($user->id == $USER->id and !isguest()) {
echo "<TD NOWRAP><P><FORM ACTION=\"$CFG->wwwroot/login/change_password.php\" METHOD=GET>";
echo "<INPUT type=hidden name=id value=\"$course->id\">";
echo "<INPUT type=submit value=\"".get_string("changepassword")."\">";
echo "</FORM></P></TD>";
}
- if ((isstudent($course->id) and ($user->id == $USER->id)) or
+ if ((isstudent($course->id) and ($user->id == $USER->id) and !isguest()) or
(isteacher($course->id) and isstudent($course->id, $user->id)) ) {
echo "<TD NOWRAP><P><FORM ACTION=\"../course/unenrol.php\" METHOD=GET>";
echo "<INPUT type=hidden name=id value=\"$course->id\">";

0 comments on commit bcd6e71

Please sign in to comment.