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

sutharsan’s picture

Project: Simplenews » Profile Tabs
Version: 5.x-1.2 » 5.x-1.0
Category: support » bug

I 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.

maartenvg’s picture

Status: Active » Closed (duplicate)