Use the existing system.
-
Create yourself a new Role for your Quiz people, using
add_role
-
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.
-
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.
-
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. 🙂