Only show the feature notice on own profile.

This commit is contained in:
flash 2018-10-27 23:39:36 +02:00
parent d5335a0d26
commit 1e4dc367fc

View file

@ -77,10 +77,10 @@ switch ($mode) {
break; break;
} }
$viewingOwnProfile = user_session_current('user_id', 0) === $userId;
$userPerms = perms_get_user(MSZ_PERMS_USER, user_session_current('user_id', 0)); $userPerms = perms_get_user(MSZ_PERMS_USER, user_session_current('user_id', 0));
$canEdit = user_session_active() && ( $canEdit = user_session_active() && (
user_session_current('user_id', 0) === $userId $viewingOwnProfile || perms_check($userPerms, MSZ_PERM_USER_MANAGE_USERS)
|| perms_check($userPerms, MSZ_PERM_USER_MANAGE_USERS)
); );
$isEditing = $mode === 'edit'; $isEditing = $mode === 'edit';
@ -252,7 +252,7 @@ switch ($mode) {
return; 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.'; $notices[] = 'The profile pages are still under much construction, more things will eventually populate the area where this container current exists.';
} }