Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter alexklinghoffer

    (@alexklinghoffer)

    Hey,

    I am using the most up to date version.

    And I see it as the administrator when I try to unlock someone. So if a user gets locked out, and then I try to unlock them, that’s the error I see as the admin, and it won’t let me unlock them. They just have to wait until the lockout period expires.

    Thread Starter alexklinghoffer

    (@alexklinghoffer)

    More info: It’s when they have been blocked due to too many failed login attempts

    Thread Starter alexklinghoffer

    (@alexklinghoffer)

    alexklinghoffer at yahoo dot com

    Thread Starter alexklinghoffer

    (@alexklinghoffer)

    I got this to work, but it was very complicated. If anyone wants to know how, just email me

    Thread Starter alexklinghoffer

    (@alexklinghoffer)

    Hey also, I found the file that sends the admin email in: wordpress-social-login/includes/services/wsl.mail.notification.php.

    The code is:

    <?php
    /*!
    * WordPress Social Login
    *
    * http://hybridauth.sourceforge.net/wsl/index.html | http://github.com/hybridauth/WordPress-Social-Login
    *    (c) 2011-2013 Mohamed Mrassi and contributors | http://wordpress.org/extend/plugins/wordpress-social-login/
    */
    
    /**
    * Email notifications to send. so far only the admin one is implemented
    */
    
    // Exit if accessed directly
    if ( !defined( 'ABSPATH' ) ) exit;
    
    // --------------------------------------------------------------------
    
    /**
    * send a notification to blog administrator when a new user register using WSL
    * again borrowed from http://wordpress.org/extend/plugins/oa-social-login/
    */
    function wsl_admin_notification( $user_id, $provider )
    {
        //Get the user details
    	$user = new WP_User($user_id);
    	$user_login = stripslashes($user->user_login);
    
    	// The blogname option is escaped with esc_html on the way into the database
    	// in sanitize_option we want to reverse this for the plain text arena of emails.
    	$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
    
    	$message  = sprintf(__('New user registration on your site: %s', 'wordpress-social-login'), $blogname        ) . "\r\n\r\n";
    	$message .= sprintf(__('Username: %s'                          , 'wordpress-social-login'), $user_login      ) . "\r\n";
    	$message .= sprintf(__('Provider: %s'                          , 'wordpress-social-login'), $provider        ) . "\r\n";
    	$message .= sprintf(__('Profile: %s'                           , 'wordpress-social-login'), $user->user_url  ) . "\r\n";
    	$message .= sprintf(__('Email: %s'                             , 'wordpress-social-login'), $user->user_email) . "\r\n";
    	$message .= "\r\n--\r\n";
    	$message .= "WordPress Social Login\r\n";
    	$message .= "http://wordpress.org/extend/plugins/wordpress-social-login/\r\n";
    
    	@wp_mail(get_option('admin_email'), '[WordPress Social Login] '.sprintf(__('[%s] New User Registration', 'wordpress-social-login'), $blogname), $message);
    }


    [Please use the code buttons when posting code here]


    Can I add a function to this file to send the email?

    Thread Starter alexklinghoffer

    (@alexklinghoffer)

    He Mel,

    Which functions.php file? Or should I try installing that code as a separate plugin?

    Best,
    Alex

    Hey Mel,

    This was great work. I edited my code as you showed, and it worked like a charm. (I’ve since removed it because I don’t need it for my site, but just wanted to see how a hack like this would work).

    I do have a need of my own though – this plugin doesn’t send a welcome email, but I would like to. And I will use the SB Welcome Email Editor plugin to customize the email.

    Do you know how I could make this plugin send the normal new registration email to users?

    Thanks so much,
    Alex

Viewing 7 replies - 1 through 7 (of 7 total)