Redirect user Not Logged In

View: New views
3 Messages — Rating Filter:   Alert me  

Redirect user Not Logged In

by Jeremi Bergman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I would like to redirect users who are not logged in at the earliest place
possible within the code.  Is there a hook that is called first that woudl
be the best place for this?

Thanks

--
Jeremi Bergman
865-622-7134
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Redirect user Not Logged In

by Jeremi Bergman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Looks like the init hook/action is what I'm looking for.

On Tue, Oct 27, 2009 at 11:13 AM, Jeremi Bergman <jeremib@...> wrote:

> I would like to redirect users who are not logged in at the earliest place
> possible within the code.  Is there a hook that is called first that woudl
> be the best place for this?
>
> Thanks
>
> --
> Jeremi Bergman
> 865-622-7134
>



--
Jeremi Bergman
865-622-7134
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: Redirect user Not Logged In

by chrisbliss18 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Without modifying core, the earliest action you can latch to is
"plugins_loaded". This runs immediately after all the activated plugins
have been initialized.

Of course, you could just put the processing code directly into an
activated plugin and not wait for the hook call.

If you are putting this code in a theme, the earliest action I recommend
using is "init".

Chris Jean
http://gaarai.com/
@chrisjean



Jeremi Bergman wrote:
> I would like to redirect users who are not logged in at the earliest place
> possible within the code.  Is there a hook that is called first that woudl
> be the best place for this?
>
> Thanks
>
>  
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers