How do I force a login?
-
Hey all,
I tried doing things like the below example
/* If not logged in, the user will be redirected to the registration/login page */
if ( !is_user_logged_in() ) :
nocache_headers();
$destination = site_url( BP_REGISTER_SLUG . ‘/’ );
wp_redirect( $destination, 302 );
exit;else :
index.php as normalbut I ran into this error message every time:
Warning: Cannot modify header information – headers already sent by (output started at C:xampplitehtdocswp-contentthemespartyhookupsindex.php:4) in C:xampplitehtdocswp-includespluggable.php on line 890Any ideas on how to force a redirect to register.php if I’m not allowed to touch the headers?
Cheers,
Ben
- The topic ‘How do I force a login?’ is closed to new replies.