Permalink
Browse files

No point in being able to login as yourself

  • Loading branch information...
1 parent d82c854 commit 0bfa3ba28610bb3dac7d8808933fd97697d4654c martin committed Aug 15, 2002
Showing with 7 additions and 5 deletions.
  1. +7 −5 user/view.php
View
@@ -127,11 +127,13 @@
echo "<INPUT type=hidden name=user value=\"$user->id\">";
echo "<INPUT type=submit value=\"".get_string("activityreport")."\">";
echo "</FORM></P></TD>";
- echo "<TD NOWRAP><P><FORM ACTION=\"../course/loginas.php\" METHOD=GET>";
- echo "<INPUT type=hidden name=id value=\"$course->id\">";
- echo "<INPUT type=hidden name=user value=\"$user->id\">";
- echo "<INPUT type=submit value=\"".get_string("loginas")."\">";
- echo "</FORM></P></TD>";
+ if ($user->id != $USER->id) {
+ echo "<TD NOWRAP><P><FORM ACTION=\"../course/loginas.php\" METHOD=GET>";
+ echo "<INPUT type=hidden name=id value=\"$course->id\">";
+ echo "<INPUT type=hidden name=user value=\"$user->id\">";
+ echo "<INPUT type=submit value=\"".get_string("loginas")."\">";
+ echo "</FORM></P></TD>";
+ }
}
echo "</TR></TABLE></CENTER>\n";

0 comments on commit 0bfa3ba

Please sign in to comment.