Hi Brajesh,
I love the plugin WordPress User Login Notifier. It is so useful for troubleshooting my site and seeing what issues users are having so that I can help out.
1 – Would it be possible to add the user’s email address into the notifications so that I don’t have to go in the site to search and find them, then copy the email address to my email program if I want to email them? (I can’t click email addresses for mailto links because I use different browsers and email clients for work purposes, the work ones have to be the defaults).
2 – I considered that I would like to send a ‘help’ email to them if they fail to log in. It would tell them how to get help like changing their password or use my contact form for example. However, we don’t want that to be sent to spammers. I leave it here as an idea for you. Perhaps a backend place where we could see a log of the notifications and click to send automated canned responses would be an idea (a premium version perhaps).
Thanks,
MikeHi Mike,
Thank you for using the plugin.
1. Please add following code to your bp-custom.php/** * Append User email to the admin notifications messages by the WordPress user login Notifier. * * @param string $message message. * @param WP_User $user user object. * * @return string */ function wpul_custom_append_user_email_to_message( $message, $user ) { return $message . '\n Email:' . $user->user_email . '\n'; } add_filter( 'wpuln_failed_login_admin_email_message', 'wpul_custom_append_user_email_to_message', 10, 2 ); add_filter( 'wpuln_successful_login_admin_email_message', 'wpul_custom_append_user_email_to_message', 10, 2 );
That will add email to the message.
2. Thank you for the suggestion. At the moment, we do not store the log at all. It may be a helpful feature in future.
Regards
BrajeshHello,
Welcome to the BuddyDev forums. Please try the following way:
// For filtering user email subject. add_filter( 'wpuln_successful_login_user_email_subject', function ( $subject, $user ) { return $subject; }, 10, 2 ); // For filtering user email message. add_filter( 'wpuln_successful_login_user_email_message', function ( $message, $user ) { return $message; }, 10, 2 );
please let me know if it helps.
Regards
Ravi- This reply was modified 10 months, 1 week ago by Ravi.
// For filtering user email message.
add_filter( ‘wpuln_successful_login_user_email_message’, function ( $message, $user ) {
return $message;
}, 10, 2 );function custom_login_email_message( $message, $user ) {
// Modify the $message as needed
$modified_message = ‘<p>New Content</p>’;
return $modified_message;
}
add_filter( ‘wpuln_successful_login_user_email_message’, ‘custom_login_email_message’, 10, 2 );I am using like this so I also need to send
// Additional headers
$headers = array(
‘Content-Type: text/html; charset=UTF-8’,
);How to do that
Hi Meet,
for your last question(about trigger), we do not log the user’s login details anywhere. So, it is not feasible to compare the ips unless it is stored somewhere.It’s a great suggestion though and we would love to have it in near future.
Regards
BrajeshHello Meet,
Please try the following to send custom headers:
add_filter( 'wpuln_successful_login_admin_email_headers', function ( $headers ) { $headers[] = 'Content-Type: text/html; charset=UTF-8'; return $headers; } );
Please let me know if it helps or not.
Regards
Ravi
You must be logged in to reply to this topic.