I tried doing something like this:
$user = $wpdb->get_row('
SELECT *
FROM ' . $wpdb->users . '
WHERE user_pass = "' . wp_hash_password('password') . '"'
);
But the wp_hash_password
function generates a different string from the one in the database, is it possible?
What I’d like to do is have a custom form in my template that just asks for a password (think of it like the username/pwd screen to the WP admin area without the username) so I’d hash whatever the user inputs, compare it with my DB and if it matches take that user and log him in.