Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The problem lies in notifications_content.module, line 51:
$items['user/%user/notifications/author'] = array(
'type' => MENU_LOCAL_TASK,
'access callback' => FALSE,
'title' => t('Author'),
'page callback' => 'notifications_content_page_author',
'pàge arguments' => array(1),
'weight' => 10,
'file' => 'notifications_content.pages.inc',
);
Took me a while to see it, but you'll notice that there's something a little different with the page arguments array index :)
Later on, when notifications_content_page_author() gets called, there will be no argument passed in since there are no 'page arguments' defined, so it will use the global $user object to gather the info to render the page. So let's say you have an admin trying to view the author subscriptions for user 5. Instead of seeing user 5's author subscriptions, the admin sees their own author subscriptions.
Comment | File | Size | Author |
---|---|---|---|
#1 | notifications_content.module.patch | 563 bytes | justageek |
Comments
Comment #1
justageek CreditAttribution: justageek commentedI have attached a patch that fixes the 'Author' menu option in the notifications_content.module menu hook.
Comment #2
kevin.dutra CreditAttribution: kevin.dutra commentedThanks for the patch. Apparently I forgot to make one :)
Comment #4
Nafes CreditAttribution: Nafes as a volunteer commentedCommitted. Thanks, kevin.dutra and justageek!