[Plugin: WP User Frontend] header already sent and wp redirect problem
-
this function is not working;
function wpuf_auth_redirect_login() { $user = wp_get_current_user(); if ( $user->id == 0 ) { nocache_headers(); wp_redirect(get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI'])); exit(); } }
also if a non-registered user visits for example dashboard url, it gives error . here is the error log;
PHP Warning: Cannot modify header information - headers already sent by
- The topic ‘[Plugin: WP User Frontend] header already sent and wp redirect problem’ is closed to new replies.