Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Managing users / external login

Use the existing system.

  1. Create yourself a new Role for your Quiz people, using add_role

  2. Make sure that Role has no capabilities, including ‘Read’. Without ‘Read’, which is the only (default) capability “Subscribers” have, the user cannot get to the backend at all but can still login.

  3. Since these are invited users, presumably you will be created in them from the backend? Make sure they are set to the correct Role when you do.

  4. Use the login_redirect hook to always shuffle those users to the front end, or they will see scary “You can’t be here” messages.

So…

// create the role
add_role('quiz_user', 'Quiz User', array());

// redirect users 
function quiz_user_redirect($redirect_to, $request_redirect_to, $user) {
    if (current_user_can('quiz_user')) $redirect_to = get_bloginfo('url'); // or other page
    return $redirect_to;
}
add_filter('login_redirect','change_login_redirect');

Very rough and untested and maybe not optimal. I just made it up. 🙂

Related Posts:

  1. Membership / subscription plugins – alternatives [closed]
  2. Allowing members to upload photos to their profile
  3. How to display public user profile with 2 additional fields? (GitHub source code included)
  4. “Members only” section of a WordPress site – self signup and no backend access
  5. Front End Plugin for User Management [closed]
  6. How can I capture Memberpress user info after signup [closed]
  7. How to create restrict content to users (by user, not by role)
  8. Using Wishlist Member and I need to access a user’s status
  9. Implementing an image hosting website using WordPress? [closed]
  10. Is there a social members only login plugin for WordPress? [closed]
  11. Paid Membership Pro with ACF [closed]
  12. Cannot access my wp-admin after installing Gzip compression [closed]
  13. Is there a plugin that lets users request an account on the site? [closed]
  14. Creating an online account & ordering system
  15. Only allowing some emails to create an account [closed]
  16. WordPress User Post Products
  17. Using WordPress to build membership Page
  18. Which Membership Plugins Allow Registered Users To Bookmark Posts? [closed]
  19. WordPress Membership Plugin Advice [closed]
  20. Constructing a Pay to Download music website with wordpress
  21. Custom fields not showing up in the user info (PaidMembershipsPro)
  22. Any tips for a plugin to define specific pages navigation for specific types of users / members? [closed]
  23. Need help with Task assigning and rewarding as currency which withdrawable
  24. Which membership plugin for a simple sign in? Personal areas for customers
  25. Membership and search criteria
  26. Student access credentials
  27. Creating one user access account for all the multiple sites
  28. Memberpress: Can I add a second email address?
  29. Public WP website with one area just for members
  30. Members-only page, but accessible via sharable link
  31. When the user entered an unauthorized url redirect to login page
  32. Which membership plugin enables users to enter html links in blogs and on their profile page?
  33. User / membership Plugin [closed]
  34. WordPress SSO SAML
  35. Which Membership Plugin? [closed]
  36. Custom user data capture form with auto membership ID
  37. Wishlist Content
  38. Woocommerce Subscriptions – Customer change subscribed product after placed
  39. Advice on setting up private site
  40. Permissions question [closed]
  41. How to block external download link access if visitor not referred from WP?
  42. Plugin Recommendation for selling one page content [closed]
  43. Need help with restricted page for users
  44. Looking for membership style plugin with edit option [closed]
  45. registration plugin [closed]
  46. Convert WordPress into Event and membership managment software [closed]
  47. All in One SEO Pack error message
  48. Shortcode not working – quotes seems strange
  49. Displaying content based on drop-down menu selection sitewide
  50. How do I make a shortcode to display the shop name on Dokan?
  51. Background Music WP [closed]
  52. How to fix broken media library?
  53. WordPress failing to update plugins
  54. Image tooltip enable/disable
  55. Using custom fields for image alt and title
  56. DB Query not working in Plugin
  57. Remove Pagination for Product Category Pages WooCommerce
  58. Is there a plugin or a way in the wordpress that would let us have different versions of a post or page accessibe to users?
  59. Error trying to update plugins
  60. Get all the URLs of the pages that uses a specific shortcode
  61. WordPress permissions error with admin account
  62. Deactivation Hook does not remove database
  63. Looking for Gallery Plugin [closed]
  64. How to accept images at multiple sizes and aspect ratios and display as standardized image size / ratio?
  65. Notice: Undefined index: mtral_field_subscriber
  66. Why is my WordPress Plugin page requesting my FTP Login Credentials?
  67. Delete free version plugin will also delete premium plugin
  68. add seperate suffix for low price and high price in woocommerce
  69. WordPress Editor completely blank [closed]
  70. Moving FB comments at the end of page
  71. Change the layout of action links under the plugin names
  72. Assign all Post in Wp to a specific Category
  73. How can i add simple code in only in posts by function.php
  74. Passing Parameters from shortcode to enqueue script
  75. Get products list by url key in WordPress Woocommerce [closed]
  76. URL rewrite with external JSON query
  77. Cross Sells are not being shown in Cart Page. Please Help!
  78. Possibility to login without password
  79. How to display registered customer list as dropdown in WooCommerce checkout?
  80. Using custom php file for ajax url inside plugin
  81. How do I create a custom permalink structure for a page template
  82. How do I get the Payzone WooCommerce payment gateway plugin to show up in the settings? [closed]
  83. simple-job-board Plugin throws an error on live server [closed]
  84. Where Should i write the code for wordpress ajax voting?
  85. How to remove a class function from a plugin by using remove_action()?
  86. Sending HTML email containing custom fields to site users from WordPress
  87. How to get images using taxonomy ( WP Media Folder)
  88. Plugin – Admin menu page broken url
  89. Error with get_price (and others) in self-written plugin to show price
  90. Hide DIV if empty – Plugin Gallery
  91. Easy WP SMTP plugin test email failed
  92. How to modify or create custom contact form 7 select options [closed]
  93. How to update a local development plugin on a separate machine
  94. adding Adsense’s In-Article Ads between images of blog post
  95. How to Include Fields in Query String When Making Request of WordPress.org Plugin API?
  96. Custom plugin – load enqueue only for this plugin
  97. Export postmeta (custom fields)
  98. Creating a form and displaying entry data as a table
  99. Which filter/action should I use to serve content for “virtual” files
  100. Customizing a blog page layout
Categories plugins Tags account, membership, plugins
My theme is not showing up on any other computers
Fix incorrect related posts code snippet

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress