From 1e4dc367fc9e5c8075c7b0b9689bd9d2c74c1a80 Mon Sep 17 00:00:00 2001 From: flashwave Date: Sat, 27 Oct 2018 23:39:36 +0200 Subject: [PATCH] Only show the feature notice on own profile. --- public/profile.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/profile.php b/public/profile.php index 9ae9c470..e67c6e06 100644 --- a/public/profile.php +++ b/public/profile.php @@ -77,10 +77,10 @@ switch ($mode) { break; } + $viewingOwnProfile = user_session_current('user_id', 0) === $userId; $userPerms = perms_get_user(MSZ_PERMS_USER, user_session_current('user_id', 0)); $canEdit = user_session_active() && ( - user_session_current('user_id', 0) === $userId - || perms_check($userPerms, MSZ_PERM_USER_MANAGE_USERS) + $viewingOwnProfile || perms_check($userPerms, MSZ_PERM_USER_MANAGE_USERS) ); $isEditing = $mode === 'edit'; @@ -252,7 +252,7 @@ switch ($mode) { return; } } - } else { + } elseif ($viewingOwnProfile) { $notices[] = 'The profile pages are still under much construction, more things will eventually populate the area where this container current exists.'; }