Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#6621 closed defect (bug) (fixed)

add_users_page not working for low priv users

Reported by: mattyrob's profile mattyrob Owned by:
Milestone: 2.5.1 Priority: high
Severity: major Version: 2.5
Component: Administration Keywords:
Focuses: Cc:

Description

This is an in-built WordPress function defined at line 271 of wp-admin/includes/plugin.php

It should add a submenu page to Users or Profile depending on the logged in users privileges.

It works for users.php but not for profile.php, the simple attached plugin demonstrates the bug.

Attachments (2)

test.php (267 bytes) - added by mattyrob 18 years ago.
patch.diff (479 bytes) - added by mattyrob 18 years ago.

Download all attachments as: .zip

Change History (6)

@mattyrob
18 years ago

#1 @mattyrob
18 years ago

As an additional point of interest, using the Admin Drop Down Menu written by Ozh also fixes this issue so I'm guessing that the problem must lie in the filtering of the menu array items.

#2 @mattyrob
18 years ago

Okay, after a lot of messing about debugging the code I think I have a fix in the attached diff.

@mattyrob
18 years ago

#3 @ryan
18 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [7618]) Fix add_users_page() when current user does not have edit_users cap. Props mattyrob. fixes #6621 for trunk

#4 @ryan
18 years ago

(In [7619]) Fix add_users_page() when current user does not have edit_users cap. Props mattyrob. fixes #6621 for 2.5

Note: See TracTickets for help on using tickets.