From b4daa48f1e4662b33b0263f97adabe9593a5ab14 Mon Sep 17 00:00:00 2001 From: donal72 Date: Fri, 3 Aug 2007 12:28:33 +0000 Subject: [PATCH] Link to profile editing should not appear on remote-users' profiles (except for the user himself). --- user/view.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/user/view.php b/user/view.php index 0e1f973b57..9b3610f733 100644 --- a/user/view.php +++ b/user/view.php @@ -200,10 +200,14 @@ $remotehost = get_record_sql($sql); echo '

'.get_string('remote'.$remotehost->application.'user')."
\n"; - if ($remotehost->application =='moodle') { - echo "Remote {$remotehost->display_name}: wwwroot}/user/edit.php\">{$remotehost->name} ".get_string('editremoteprofile')."

\n"; + if ($USER->id == $user->id) { + if ($remotehost->application =='moodle') { + echo "Remote {$remotehost->display_name}: wwwroot}/user/edit.php\">{$remotehost->name} ".get_string('editremoteprofile')."

\n"; + } else { + echo "Remote {$remotehost->display_name}: wwwroot}/\">{$remotehost->name} ".get_string('gotoyourserver')."

\n"; + } } else { - echo "Remote {$remotehost->display_name}: wwwroot}/\">{$remotehost->name} ".get_string('gotoyourserver')."

\n"; + echo "Remote {$remotehost->display_name}: wwwroot}/\">{$remotehost->name}

\n"; } } -- 2.39.5