function bb_auth($scheme = 'auth') { // Checks if a user has a valid cookie, if not redirects them to the main page if (!bb_validate_auth_cookie('', $scheme)) { nocache_headers(); if ('auth' === $scheme && !bb_is_user_logged_in()) { wp_redirect(bb_get_uri('bb-login.php', array('re' => $_SERVER['REQUEST_URI']), BB_URI_CONTEXT_HEADER + BB_URI_CONTEXT_BB_USER_FORMS)); } else { wp_redirect(bb_get_uri(null, null, BB_URI_CONTEXT_HEADER)); } exit; } }
function nxt_validate_auth_cookie($cookie = '', $scheme = 'auth') { bb_log_deprecated('function', __FUNCTION__, 'bb_validate_auth_cookie'); return bb_validate_auth_cookie($cookie, $scheme); }