Support » Plugins » get_currentuserinfo and init

  • 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”?


Viewing 2 replies - 1 through 2 (of 2 total)
  • [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, 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘get_currentuserinfo and init’ is closed to new replies.