WordPress.org

Support

Support » Plugins and Hacks » Hacks » [Resolved] wp_get_current_user() and the author template

[Resolved] wp_get_current_user() and the author template

  • alesub
    Participant

    @alesub

    Hi,

    I just found out that if you call to wp_get_current_user() to get the logged in user while being on an author template, wp returns the author that’s supposed to be shown on the main content, instead of the actual user that is logged in, viewing the page.

    Am I doing something wrong or did I just found a wordpress bug?

    Thanks!

Viewing 1 replies (of 1 total)
  • alesub
    Participant

    @alesub

    Found the bug: The theme was using the $current_user variable to set the current author data.

    So for the record: Don’t use this variable for anything else than bringing up the current logged in user.

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] wp_get_current_user() and the author template’ is closed to new replies.