I’m writing a plugin which needs to check if a given username and password can login a user. I DON’T want to log this user in. So wp_signon() is a problem for me because it programmatically logs in the user who owns the credentials.
Basically I need to do exactly what wp_signon() does, but instead return TRUE/FALSE instead of the automatic login.
Any advice on how I can do this?
I turns out that this function already exists:
wp_authenticate();It’s just not documented in the codex at all! But you can look it up here.
Update: There’s an even better potential solution that you can read about here.