WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp_get_current_user() and the author template (2 posts)

  1. alesub
    Member
    Posted 2 years ago #

    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!

  2. alesub
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic