I'm working on a custom Wordpress login form. At the moment users are able to login with their username or email but i also want to add the option to user their account-number. The account number is a custom metafield and is different form the id.
I've found the following hooks
- wp_authenticate_user
- wp_authenticate_username_password
but i've online seen options to remove the username of email not ways to add meta fields.
Kind regards
You need to add account number field to login form and then check or validate according to your need using
wp_authenticate_user
hook.So you can try something like this: