WordPress.org

Ready to get started?Download WordPress

Forums

How can I get the comment author's ID or an user's ID from a username? (3 posts)

  1. linksku
    Blocked
    Posted 4 years ago #

    I want to be able to get the comment author's ID. Or, I can get the ID from get_comment_author(), which returns a username.

  2. linksku
    Blocked
    Posted 4 years ago #

    Bump

  3. peaxi
    Member
    Posted 4 years ago #

    $id = get_comment(get_comment_ID())->user_id;
    It appears to be set to 0 if not from a registered user ...
    :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.