Support » Fixing WordPress » How to Get User by "Name"?

  • Moderator Andrew Nevins


    Front-end developer


    I’m trying to search users by “Name”, not “Username”, but I can’t find any function to do this.

    When I say “Name” I am referring to the “Name” column on the “Users” section of the dashboard. See this [screenshot].

    Some users are going to be deleted, but we still want their name credited to their posts. To do this, I’m using the more fields plugin to create a field under each post (in the admin panel) named “Original Author” [screenshot].
    This field will be populated by the first and last name of the user, separated by a space.

    On the front-end I need to display the original author, using the original_author custom field key, only if that author has been deleted. That means I need to check whether that first and last name exists as a user.

    I know it may be better to enter the, “Username” into the “Original author” field instead of the first and last names, but the person entering this field may not necessarily know the username at the time.

    Is there a function I can use that allows me to check the user by “Name”?

  • The topic ‘How to Get User by "Name"?’ is closed to new replies.