SlideShare a Scribd company logo
1 of 25
Download to read offline
Building a Private User
          Access Area with
          WordPress
           By Vanessa Chu
           vanessa@designfaire.com
           www.designfaire.com



Thursday, October 13, 2011
Thursday, October 13, 2011
Logged in Site Requirements

               3 separate “blog” areas for each user group
               Each group has unique editing and viewing abilities
               Blog must have categories
               Blog must be searchable
               Media in these areas must be locked




Thursday, October 13, 2011
Content Restriction
            Membership sites that manage
            the viewing of content




                             Wishlist Membership   Membership
                             MemberWing            Magic Members


Thursday, October 13, 2011
Capabilities Restriction
            Membership site that manages user
            capabilities

               Manages user permissions to do VARIOUS tasks by
               creating custom user groups and roles, and assigning
               capabilities to each
               E.g User Access Manager, Members Plugin, Role
               Scoper etc.




Thursday, October 13, 2011
What are Roles?

               Roles are a set of abilities assigned to users which
               control what a user can or cannot do on a site
               5 default Roles: Administrator, Editor, Author,
               Contributor, Subscriber
               http://codex.wordpress.org/Roles_and_Capabilities




Thursday, October 13, 2011
What are Capabilities?

               Each Role is allowed to perform a set of tasks called
               Capabilities.
               E.g. publish_post, moderate_comments, edit_users
               etc.




Thursday, October 13, 2011
What are User Groups?
               User Groups are different from Roles.
               User Groups are arbitrary names for groupings of users
               User Groups are assigned Roles and Roles are
               assigned Capabilities.




Thursday, October 13, 2011
So....
          If you can create unique roles,
          then you can create unique
          roles with unique capabilities!




Thursday, October 13, 2011
The process...
          1.Install User Access Manager and Capability Manager
            plugins
          2.Create User Groups
          3.Create Custom Post Types & Taxonomies for each
            User Group
          4. Create Roles and assign capabilities to each User Group
          5. Create Custom Post Type Templates
          6. Finishing touches


Thursday, October 13, 2011
Create User Groups




Thursday, October 13, 2011
Register Custom Post Types




Thursday, October 13, 2011
Thursday, October 13, 2011
Register Custom Taxonomies

               Custom taxonomies have capability arguments as well.
               Register your custom taxonomies with capabilities,
               then assign the capabilities to specific roles as you
               would with Custom Post Types.
               See: http://justintadlock.com/archives/2010/06/10/a-
               refresher-on-custom-taxonomies




Thursday, October 13, 2011
Create your Roles & assign Capabilities




Thursday, October 13, 2011
Thursday, October 13, 2011
Manually Creating Roles &
          Capabilities
               You can create roles and capabilities manually via the
               functions.php file.
               Adding custom roles
               add_role( $role_name, $display_name, $capabilities );
               // for example:
               add_role( 'photo_uploader', 'Photo Uploader', array( 'organize_gallery' ) );


               Adding custom capabilities
               // get the "author" role object
                 $role = get_role( 'author' );
           
                 // add "organize_gallery" to this role object
                 $role->add_cap( 'organize_gallery' );

               See: http://www.garyc40.com/2010/04/ultimate-guide-to-roles-and-capabilities/


Thursday, October 13, 2011
Thursday, October 13, 2011
Post & Page Access




Thursday, October 13, 2011
Create your Custom Post
          Type Templates
               Create archive-posttypename.php and single-posttypename.php




Thursday, October 13, 2011
Custom Sidebars

               In your archive-posttypename.php file you may want to
               place in custom sidebars with you corresponding
               Taxonomies.
               Or you can create a custom widgetized sidebar for
               each of your archive-post-typename.php




Thursday, October 13, 2011
Conditional Statements

               Use conditional statements with particular user
               capabilities to create unique instances for each role.

            if ( current_user_can
            ( 'edit_directors' ) ) {
              // do something
          }




Thursday, October 13, 2011
Re-direction

               User Access Manager has the ability for you to assign a
               particular page to redirect a User Group once logged
               in.
               Redirect plugin also does this (e.g. Peter’s Login
               Redirect plugin)




Thursday, October 13, 2011
Custom Post Type Search




Thursday, October 13, 2011
Thanks!

                    Vanessa Chu
                    vanessa@designfaire.com
                    www.designfaire.com




Thursday, October 13, 2011

More Related Content

Recently uploaded

React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Nikki Chapple
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sectoritnewsafrica
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...amber724300
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 

Recently uploaded (20)

React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 

User access manager presentation web

  • 1. Building a Private User Access Area with WordPress By Vanessa Chu vanessa@designfaire.com www.designfaire.com Thursday, October 13, 2011
  • 3. Logged in Site Requirements 3 separate “blog” areas for each user group Each group has unique editing and viewing abilities Blog must have categories Blog must be searchable Media in these areas must be locked Thursday, October 13, 2011
  • 4. Content Restriction Membership sites that manage the viewing of content Wishlist Membership Membership MemberWing Magic Members Thursday, October 13, 2011
  • 5. Capabilities Restriction Membership site that manages user capabilities Manages user permissions to do VARIOUS tasks by creating custom user groups and roles, and assigning capabilities to each E.g User Access Manager, Members Plugin, Role Scoper etc. Thursday, October 13, 2011
  • 6. What are Roles? Roles are a set of abilities assigned to users which control what a user can or cannot do on a site 5 default Roles: Administrator, Editor, Author, Contributor, Subscriber http://codex.wordpress.org/Roles_and_Capabilities Thursday, October 13, 2011
  • 7. What are Capabilities? Each Role is allowed to perform a set of tasks called Capabilities. E.g. publish_post, moderate_comments, edit_users etc. Thursday, October 13, 2011
  • 8. What are User Groups? User Groups are different from Roles. User Groups are arbitrary names for groupings of users User Groups are assigned Roles and Roles are assigned Capabilities. Thursday, October 13, 2011
  • 9. So.... If you can create unique roles, then you can create unique roles with unique capabilities! Thursday, October 13, 2011
  • 10. The process... 1.Install User Access Manager and Capability Manager plugins 2.Create User Groups 3.Create Custom Post Types & Taxonomies for each User Group 4. Create Roles and assign capabilities to each User Group 5. Create Custom Post Type Templates 6. Finishing touches Thursday, October 13, 2011
  • 11. Create User Groups Thursday, October 13, 2011
  • 12. Register Custom Post Types Thursday, October 13, 2011
  • 14. Register Custom Taxonomies Custom taxonomies have capability arguments as well. Register your custom taxonomies with capabilities, then assign the capabilities to specific roles as you would with Custom Post Types. See: http://justintadlock.com/archives/2010/06/10/a- refresher-on-custom-taxonomies Thursday, October 13, 2011
  • 15. Create your Roles & assign Capabilities Thursday, October 13, 2011
  • 17. Manually Creating Roles & Capabilities You can create roles and capabilities manually via the functions.php file. Adding custom roles add_role( $role_name, $display_name, $capabilities ); // for example: add_role( 'photo_uploader', 'Photo Uploader', array( 'organize_gallery' ) ); Adding custom capabilities // get the "author" role object $role = get_role( 'author' );   // add "organize_gallery" to this role object $role->add_cap( 'organize_gallery' ); See: http://www.garyc40.com/2010/04/ultimate-guide-to-roles-and-capabilities/ Thursday, October 13, 2011
  • 19. Post & Page Access Thursday, October 13, 2011
  • 20. Create your Custom Post Type Templates Create archive-posttypename.php and single-posttypename.php Thursday, October 13, 2011
  • 21. Custom Sidebars In your archive-posttypename.php file you may want to place in custom sidebars with you corresponding Taxonomies. Or you can create a custom widgetized sidebar for each of your archive-post-typename.php Thursday, October 13, 2011
  • 22. Conditional Statements Use conditional statements with particular user capabilities to create unique instances for each role. if ( current_user_can ( 'edit_directors' ) ) {     // do something } Thursday, October 13, 2011
  • 23. Re-direction User Access Manager has the ability for you to assign a particular page to redirect a User Group once logged in. Redirect plugin also does this (e.g. Peter’s Login Redirect plugin) Thursday, October 13, 2011
  • 24. Custom Post Type Search Thursday, October 13, 2011
  • 25. Thanks! Vanessa Chu vanessa@designfaire.com www.designfaire.com Thursday, October 13, 2011