BuddyDev

Search

A question about “WP User Login Notifier” plugin

  • Participant
    Level: Initiated
    Posts: 3
    David G. on #43756

    Hello,

    I have the “WP User Login Notifier” plugin installed on my WordPress website, and I have a question.

    How can I do or add so that in the email, apart from the user’s ip, I can also obtain the country/city?

    Thanks in advance,

    Regards,

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2909
    Ravi on #43770

    Hello David,

    Welcome to the BuddyDev Forums.

    Please look at the following filters to modify the email message.

    
    wpuln_successful_login_user_email_message
    wpuln_failed_login_user_email_message
    

    Please let me know if you need any further assistance.

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 3
    David G. on #43773

    Hello!

    Ok, I have found those lines of code, and what do I have to do now?

    I have installed the plugin “Geolocation IP Detection”

    Thanks in advance,

    Regards.

    • This reply was modified 2 years ago by David G..
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2909
    Ravi on #43804

    Hello David,

    You can use the above-mentioned filters. You need to make a code to filter or modify the email message and put that code in ‘bp-custom.php’ or your active theme ‘functions.php’ file.

    Please look at the sample code:

    
    add_filter( 'wpuln_successful_login_user_email_message', function ( $message, $user, $details ) {
    
    	// Fetch the details for the user.
    	// Append the details to message.
    	// Return the modified message.
    
    	return $message;
    } );
    
    

    Regards
    Ravi

You must be logged in to reply to this topic.

This topic is: not resolved