How Authentication in wordpress works? wp_authenticate_username_password()

This is the line you’re looking for: $userdata = get_user_by(‘login’, $username); The get_user_by function calls WP_User::get_data_by and that function eventually executes this SQL: SELECT * FROM $wpdb->users WHERE user_login = $username The hashed password will be contained in the results of that query. Eventually, the wp_check_password function will be called to compare the hashes.

post_password_required() not recognizing cookie set with correct password

Figured it out! The new version of WordPress (3.4) changed the way the password protected pages worked. This should work for you now: <?php if ( post_password_required() ) { ?> <form method=”post” action=”/wp-login.php?action=postpass”> <p>This content is password protected. To view it please enter your password below:</p> <input type=”password” style=”margin:10px 0;” size=”20″ id=”pwbox-<?php the_ID(); ?>” name=”post_password”/></label><br/> … Read more

Get plain password on register

I haven’t looked into it, but any hook on the page that processes the new user registration will have access to the $_POST data and as such you could get it from there. I agree with the other comments above, you should be able to use use the WordPress hash and check the password on … Read more

How to set minimum length and error message for password recovery?

I’ve managed to find why I couldn’t change the error message. For some reason, our old dev has put a login_error_override() in Theme’s Function (function.php from theme). After commented the function call, my custom error worked perfectly, as well the original error messages from theme, wordpress and plugins. //add_filter(‘login_errors’, ‘login_error_override’);

User password field is empty

I still wouldn’t recommend this because it is probably exploitable somehow… Technically assuming all the right hooks and functions are called, a user should not be able to login if supplying a blank password even if the user_pass field in the database is empty. Why…? When you try to login using the form as seen … Read more