Checks user is logged in, if not it redirects them to 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.
<?php auth_redirect(); ?>
This function accepts no parameters.
Function redirects or exits, does not return
As a pluggable function, you can redefine it and your version will be used instead.
auth_redirect() is located in