Results 1 to 2 of 2

Thread: Template and Roles

  1. #1
    Andrea Barghigiani is offline Hello World
    Join Date
    Sep 2010
    Location
    Italy, Leghorn
    Posts
    16

    Default Template and Roles

    Hi there!

    I have a tricky question for you, I know how WP is working with the default roles but for a project I need to set up three different new roles. So I tought well let's start from the function.php file.

    And with the help of the action hook init I've been able to load a function that checks if inside my WP system are already present my new roles if it's not the case I'll set some default capabilities for each new role.

    Until here everythings seems to work properly, but when I am going to register a new user and set it to a new role with the following code:

    Code:
    wp_update_user( array ('ID' => $user_id, 'role' => $posted['your_role'] ) ) ;
    Instead to have all the capabilities applied to one of the roles all thet I get is:

    Code:
    [wp_capabilities] => Array         (             [centro] => 1         )
    nothing else... My new user does not have all the capabilities that he needs to have in order to use properly my new theme.

    Anyone knows if there is something that I am missing? What is the purpose of create a role if it does not brings its own capabilities?

    Thanks for the answers!

  2. #2
    Jeffro's Avatar
    Jeffro is offline WPTavern Forum Admin
    Join Date
    Jan 2009
    Location
    Ohio
    Posts
    2,359

    Default

    I think Justin Tadlocks Members Plugin would be perfect for you. http://wordpress.org/extend/plugins/members/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •