• Skip to primary navigation
  • Skip to main content

RocketGeek

Home of WP-Members, The Original WordPress Membership Plugin

  • WordPress Plugins
    • WP-Members
      • FAQs
      • Quick Start
      • Documentation
      • Extensions
    • Advanced Options
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Download Protect
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Invite Codes
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • MailChimp Integration
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • PayPal Subscriptions
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Salesforce Web-to-Lead
    • Security
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Text Editor
      • Purchase the Plugin
      • Get the Pro Bundle
    • User List
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • User Tracking
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Memberships for WooCommerce
    • WordPass
  • Blog
    • Basics
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Store
    • Cart
    • Checkout
  • Contact
  • Log In
  • Show Search
Hide Search
Home » Archives for get_user_by

get_user_by

Log in with Email or Username

Chad Butler · Jan 6, 2015 ·

This article is provided free. Find out how you can get full access to premium content, including how-to articles and support forums, as well as priority email support and member exclusive plugin extensions..

 

Here is a simple method for allowing users to log in with either their username or their email address.

This process allows the user to log in using either their username or their email address.  It’s not difficult to implement and leaves you with a clean process where you don’t have to worry about what to do when users change their email address.

Continue Reading →

Reset password with just email

Chad Butler · Jan 27, 2014 ·

NOTE: if you are using version 2.9+, there is a new set of code snippets using some new filter hooks that make this process easier.

One of the requests I get most often is how can I change the plugin to have the password reset only require the user to give their email address.  This especially comes up when people customize the process to use the person’s email address as their username, since a password reset form with “username” and “email” doesn’t make much sense in that situation.

Well, since version 2.8.5, there has been a filter hook in the password reset process that allows you to filter the arguments that are passed in order to reset the user’s password – wpmem_pwdreset_args.  There are two stages to this demonstration, and thus two parts of the code snippet.  First, we only need a form requesting the user’s email, so we will remove the “username” field from the form.  Second is filtering the arguments of the password reset process so that the user’s password can be reset with only the email provided. Continue Reading →

Ready to get started?

Join Today!

© 2025 · butlerblog.com · RocketGeek is built using WordPress, WP-Members, and the Genesis Framework

  • butlerblog.com
  • WP-Members Support Subscription
  • Terms of Service
  • Privacy Policy
  • Refund Policy