How do I find users by password?

The user password (stored as an MD5 hash) can be retrieved like so: $users = get_users(); foreach ( $users as $user ) { $password = $user->user_pass; } Assuming you have some known value for passkey, you can hash it and compare it to each user’s password: $passkey = ‘somestring’; $hashed_passkey = md5( $passkey ); $users … Read more

How to delete Password Protected posts cookies when a user logged out from the site

The post password cookie is set with: setcookie( ‘wp-postpass_’ . COOKIEHASH, $hasher->HashPassword( wp_unslash( $_POST[‘post_password’] ) ), $expire, COOKIEPATH, COOKIE_DOMAIN, $secure ); in the wp-login.php file. We can then use the clear_auth_cookie hook, in the wp_clear_auth_cookie() function, to clear it on logout: /** * Clear the Post Password Cookie on logout. * * @link http://wordpress.stackexchange.com/a/198890/26350 */ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)