From 92fe7fcad0192067a80877754bf29bcef7d344dd Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 7 Apr 2008 21:25:31 +0000 Subject: [PATCH] Fix add_users_page() when current user does not have edit_users cap. Props mattyrob. fixes #6621 for trunk git-svn-id: http://svn.automattic.com/wordpress/trunk@7618 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/menu.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-admin/menu.php b/wp-admin/menu.php index 342f1ee089..e39d638eaa 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -52,6 +52,7 @@ if ( current_user_can('edit_users') ) { $submenu['users.php'][5] = array(__('Authors & Users'), 'edit_users', 'users.php'); $submenu['users.php'][10] = array(__('Your Profile'), 'read', 'profile.php'); } else { + $_wp_real_parent_file['users.php'] = 'profile.php'; $submenu['profile.php'][5] = array(__('Your Profile'), 'read', 'profile.php'); }