Browse files

Link to profile editing should not appear on other users' profiles.

  • Loading branch information...
1 parent 8ebd0d9 commit aa34400457bc1c27d2b75f9d8eae0d9a4772c52a donal72 committed Aug 3, 2007
Showing with 5 additions and 1 deletion.
  1. +5 −1 user/view.php
View
6 user/view.php
@@ -179,7 +179,11 @@
if (is_mnet_remote_user($user)) {
echo "<p class=\"errorboxcontent\">This profile is for a remote user from another Moodle system. <br />\n";
$remotehost = get_record('mnet_host', 'id', $user->mnethostid);
- echo "Remote Moodle: <a href=\"{$remotehost->wwwroot}/user/edit.php\">{$remotehost->name}</a> (click here to edit your profile on the remote server) </p>\n";
+ if ($USER->id == $user->id) {
+ echo "Remote Moodle: <a href=\"{$remotehost->wwwroot}/user/edit.php\">{$remotehost->name}</a> (click here to edit your profile on the remote server) </p>\n";
+ } else {
+ echo "Remote Moodle: <a href=\"{$remotehost->wwwroot}\">{$remotehost->name}</a> </p>\n";
+ }
}
echo '<table width="80%" class="userinfobox" summary="">';

0 comments on commit aa34400

Please sign in to comment.