auth_redirect


auth_redirect ( No parameters )

Defined at:

Description

Checks if a user is logged in, if not it redirects them to the login page.

When this code is called from a page, it checks to see if the user viewing the page is logged in. If the user is not logged in, they are redirected to the login page. The user is redirected in such a way that, upon logging in, they will be sent directly to the page they were originally trying to access.

Related Functions

wp_redirect, is_redirect, wp_safe_redirect, wp_sanitize_redirect, wp_validate_redirect

Top Google Results

User discussions

wpseek mobile