]> git.mjollnir.org Git - moodle.git/commitdiff
Link to profile editing should not appear on remote-users' profiles (except for the...
authordonal72 <donal72>
Fri, 3 Aug 2007 12:28:33 +0000 (12:28 +0000)
committerdonal72 <donal72>
Fri, 3 Aug 2007 12:28:33 +0000 (12:28 +0000)
user/view.php

index 0e1f973b5742b454f9ed694dfb31ad03f232792a..9b3610f733c9dca7acf705470b4f7b51e6b9c341 100644 (file)
         $remotehost = get_record_sql($sql);
         
         echo '<p class="errorboxcontent">'.get_string('remote'.$remotehost->application.'user')." <br />\n";
-        if ($remotehost->application =='moodle') {
-            echo "Remote {$remotehost->display_name}: <a href=\"{$remotehost->wwwroot}/user/edit.php\">{$remotehost->name}</a> ".get_string('editremoteprofile')." </p>\n";
+        if ($USER->id == $user->id) {
+            if ($remotehost->application =='moodle') {
+                echo "Remote {$remotehost->display_name}: <a href=\"{$remotehost->wwwroot}/user/edit.php\">{$remotehost->name}</a> ".get_string('editremoteprofile')." </p>\n";
+            } else {
+                echo "Remote {$remotehost->display_name}: <a href=\"{$remotehost->wwwroot}/\">{$remotehost->name}</a> ".get_string('gotoyourserver')." </p>\n";
+            }
         } else {
-            echo "Remote {$remotehost->display_name}: <a href=\"{$remotehost->wwwroot}/\">{$remotehost->name}</a> ".get_string('gotoyourserver')." </p>\n";
+            echo "Remote {$remotehost->display_name}: <a href=\"{$remotehost->wwwroot}/\">{$remotehost->name}</a></p>\n";
         }
     }