I am using 2.0 and I have a plugin that use's server's REMOTE_USER to auto create user account for the first time user. I hooked it to "init" action but the index page's side bar still shows the "login" menu item (until I do a refresh). It appears the set_currentuserinfo() function get called from wp_register() (in template sidebar.php) once before the init() is called. Is this a bug? Is there a hook get called before "init"?
Thanks!
[no need for re-posting if in the wrong section. Just let the mods know and they can move it over. Double posts are more annoying than misplaced posts! - deleted the other one]
I came to understand that init does get called before the get_currentuserinfo() but the problem is that autmoatical login's call to wp_setcookie() does have any effect on the first page load as acoordinate to http://www.php.net/manual/en/function.setcookie.php, one of common pitfalls of cookie is that "Cookies will not become visible until the next loading of a page that the cookie should be visible for.". WP's cookie based login check will never works for the first page load.