Closed (duplicate)
Project:
Profile Tabs
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Jan 2008 at 16:34 UTC
Updated:
8 Apr 2008 at 14:31 UTC
Hello,
I am using Simplenews in combination with the module Profiletab.
I would like to remove the "My Newsetters" from the Profile Menu. The tab "My Newsletters" only shall be shown if the user is editing his own profile.
line 528 right now is:
case 'categories':
if (user_access('subscribe to newsletters')) {
$output[] = array('name' => 'newsletter', 'title' => t('My newsletters'), 'weight' => 10);
}
How could I edit the code to prevent users ( profile user UID != Provile Visitor UID ) from seing this tab as long as the profile page is not being accessed by the real user ( profile user UID = Profile Visitor UID ) himself, or as long as the user is not editing his own profile.
Thanks for help!
Comments
Comment #1
sutharsan commentedI can not (fully) reproduce your issue.
View you own profile: tabs 'Account' and 'Newsletter'
View profile of others: tabs 'Account' and 'Newsletter' (requires 'administer users' or 'access user profiles')
The 'Newsletter' tab links to 'user//view/newsletter' which does not exist in Simplenews and has therefore no content.
This issue is related to the Profiletabs module and I therefore transfer the issue to this module.
Comment #2
maartenvg commentedThis is a duplicate of #173848: Ability to remove Tabs from Profile.