Support » Plugin: WordPress Social Login » Need to send welcome email

Viewing 2 replies - 1 through 2 (of 2 total)
  • Looking at the changelog it seems this was a previous feature of the plugin but was substituted with the automatic login after registration.

    If so it should be possible to recover this functionality at some point of the registration process. I’m trying to come up with a solution through the code but so far none has worked.

    I’m already able to do some of the functionality, at the wsl.mail.notification.php document, you can set it up to send the welcome email but I don’t know how to provide the random generated password to the new user as it pulls the user information from a new user instance created from the database (user has already been registered) which means the password has already been encrypted.

    Ok so i was finally able to fix this so I’m going to post it up here for ppl to know in case someone needs the same fix.

    It’s actually relatively easy once you read through the code.

    All you have to do is go to the following file: “wp-content/plugins/wordpress-social-login/includes/services/wsl.authentication.php”, at around code line 1528 (I may have changed the indentation while looking for it) you have a function called “wsl_process_login_create_wp_user” inside this function the user is created and at some point you will find the line of code where they call the internal function of the plugin to send the notifications, it looks like this.

    // Send notifications 
    
    	if ( get_option( 'wsl_settings_users_notification' ) == 1 ){
    		//wsl_admin_notification( $user_id, $provider );
    	}

    There, you can just comment it and add the native “wp_new_user_notification” function. This is more useful for me as I have the SB Welcome Email plugin with a customized mail template, but simply by having this added there you will get back your welcome email notification send to new users.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need to send welcome email’ is closed to new replies.