Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional WordPress Plugin Development
This is the forum to discuss the Wrox book Professional WordPress Plugin Development by Brad Williams, Ozh Richard, Justin Tadlock; ISBN: 978-0-470-91622-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional WordPress Plugin Development section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 16th, 2011, 03:54 PM
Registered User
Points: 13, Level: 1
Points: 13, Level: 1 Points: 13, Level: 1 Points: 13, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 8: boj-forum-roles

When I install this plugin, I, as the administrator, can change the role of another user, but that user can't login. I get this message
HTML Code:
Notice: Undefined index: in C:\xampp\htdocs\xampp\BFWP\wp-admin\includes\menu.php on line 219
You do not have sufficient permissions to access this page.
Please advise. Thanks.
Reply With Quote
  #2 (permalink)  
Old September 16th, 2011, 04:05 PM
Registered User
Points: 13, Level: 1
Points: 13, Level: 1 Points: 13, Level: 1 Points: 13, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Possible Solution

After each capability is stated in the add_role function, a "=>true" must be placed afterwards.

i.e.
Code:
        /* Create the forum administrator role. */
        add_role(
            'forum_administrator',
            'Forum Administrator',
            array(
                'publish_forum_topics'=>true,
                'edit_others_forum_topics'=>true,
                'delete_forum_topics'=>true,
                'read_forum_topics'=>true
            )
        );
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 16 - Try it Out Checking Roles with IsUserInRole at Runtime skachy BOOK: Beginning ASP.NET 4 : in C# and VB 5 January 2nd, 2011 08:13 AM
Chapter 16:Page 615 try it out Checking Roles with IsUserInRole at Runtime lstew452 BOOK: Beginning ASP.NET 4 : in C# and VB 2 July 5th, 2010 02:20 PM
Chapter 6 Delete Roles does not work for me ocn BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 0 November 29th, 2009 10:17 PM
Chapter 6 Roles hdpark BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 7 November 16th, 2007 06:43 PM
Chapter 6 - Roles/Permissions g_rhymes BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 3 June 28th, 2004 11:03 AM



All times are GMT -4. The time now is 01:25 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.