Ticket #6621 (closed defect: fixed)

Opened 1 month ago

Last modified 1 month ago

add_users_page not working for low priv users

Reported by: mattyrob Assigned to: anonymous
Priority: high Milestone: 2.5.1
Component: Administration Version: 2.5
Severity: major Keywords:
Cc: MattyRob

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

test.php (267 bytes) - added by mattyrob on 04/06/08 19:22:43.
patch.diff (479 bytes) - added by mattyrob on 04/07/08 19:59:28.

Change History

04/06/08 19:22:43 changed by mattyrob

  • attachment test.php added.

04/07/08 15:57:42 changed by mattyrob

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.

04/07/08 19:59:14 changed by mattyrob

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

04/07/08 19:59:28 changed by mattyrob

  • attachment patch.diff added.

04/07/08 21:25:32 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

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

04/07/08 21:25:42 changed by ryan

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