Support » Plugin: WordPress Social Login » Facebook-Login no more working after update !!!

  • Hi,

    I have update the social plugin on thursday to the version 2.1.3 and I have installed the plugin “Theme My Login” Version 6.2.3.
    I have set in both of the the registration to be moderated by the admin.

    After the update the login through facebook is not working anymore!!!
    the users are still there , but if I login with my facebook account I get the message that my login was successfull but I have to wait for the account to be accepted by the admin. The state of the users is not pending the users has used to work, but not now..

    SOS HELP HELP Please !!!

    http://wordpress.org/extend/plugins/wordpress-social-login/

Viewing 8 replies - 1 through 8 (of 8 total)
  • any help? we need help pls!

    SERVER_PORT: On (80)
    HTTP_X_FORWARDED_PROTO: N/A

    MULTI-SITE: No

    WSL VERSION: 2.1.3
    WORDPRESS VERSION: 3.5

    PHP VERSION: 5.2.17
    MYSQL VERSION: 5.5.27-log
    WEB SERVER INFO: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r

    SESSION: Enabled
    SESSION:WSL WordPress Social Login 2.1.3
    SESSION:NAME: PHPSESSID

    COOKIE PATH: /
    SAVE PATH: 2;/var/tmp
    USE COOKIES: On
    USE ONLY COOKIES: Off

    PHP/CURL: Supported
    PHP/CURL/VER: 7.21.1
    PHP/CURL/SSL: OpenSSL/0.9.8x
    PHP/FSOCKOPEN: Supported
    PHP/JSON: Supported

    ACTIVE PLUGINS:

    akismet/akismet.php
    all-in-one-event-calendar/all-in-one-event-calendar.php
    custom-dashboard-help/custom-dashboard-help.php
    easy-contact-forms/easy-contact-forms.php
    facebook-album-sync/facebook-albums-sync.php
    facebook-albums/fbalbum.php
    generalstats/generalstats.php
    jcwp-youtube-channel-embed/jcwp-youtube-channel-embed.php
    jetpack/jetpack.php
    news-announcement-scroll/news-announcement-scroll.php
    pagerestrict/pagerestrict.php
    posts-in-page/posts_in_page.php
    prezi-embedder/prezi-embedder.php
    quick-pagepost-redirect-plugin/page_post_redirect_plugin.php
    rv-embed-pdf/rv_embedpdf.php
    slideshow-jquery-image-gallery/slideshow.php
    social-media-widget/social-widget.php
    theme-my-login/theme-my-login.php
    uji-countdown/uji-countdown.php
    ultimate-tinymce/main.php
    wordpress-social-login/wp-social-login.php
    youtube-channel-gallery/youtube-channel-gallery.php

    CURRENT THEME:

    Esplanade: 1.0.9

    # EOF

    anbenham –
    I can’t promise that I can help, but just wondering if you were using a previous version Theme My Login?

    I know that the moderated method in Theme My Login makes it so the admin must approve, but are these already active users that get the message about pending status?

    Regards,
    Don

    Hi,

    I am using a new version of the theme my login.. 6.2.3.

    The problem concerns users that are already registered, and that did have access to the site..

    anbenham
    Keep in mind I did not write either of those plugins, but the problem seems to be in the WordPress Social Login plugin as far as I can tell (and the way looks at Theme My Login user moderation status).

    I can tell you how to temporarily fix it, but when they update the plugin it will be overridden, so you should submit a bug report to them if you can, so it can be addressed.

    To fix it, you will need to edit the wsl.authentication.php file located in the plugin’s directory in the /includes/services/ folder.

    Make the following changes:

    Look for the function called wsl_process_login_authenticate_wp_user, (at or around line 900 if using a code editor). Add the following code to it:

    global $wpdb;
     $is_approved=0;
     $cap_key = $wpdb->prefix . 'capabilities';
     if ( $userdata = get_user_by( 'id', $user_id ) ) {
       if ( !array_key_exists( 'pending', (array) $userdata->$cap_key ) ) {
          $is_approved=1;
       }
     }

    Then a few lines down from that you, will see if( get_option( 'wsl_settings_bouncer_new_users_moderation_level' ) == 101 ){ and down a few lines more, you will see elseif( get_option( 'wsl_settings_bouncer_new_users_moderation_level' ) == 102 ){.
    Change those lines to:

    if( get_option( 'wsl_settings_bouncer_new_users_moderation_level' ) == 101 && $is_approved == 0 ){
    and
    elseif( get_option( 'wsl_settings_bouncer_new_users_moderation_level' ) == 102 && $is_approved == 0 ){

    Save the file.
    This will check the user’s capabilities to see if they have already been approved via normal Theme My Login process. If so, it lets them log in correctly. If not (i.e., they are a new user), they will get the standard, “need to be approved” message.

    So in recap, the entire wsl_process_login_authenticate_wp_user function should look like this:

    function wsl_process_login_authenticate_wp_user( $user_id, $provider, $redirect_to, $adapter, $hybridauth_user_profile )
    {
    	// calculate user age
    	$user_age = $hybridauth_user_profile->age;
    
    	// not that precise you say... well welcome to my world
    	if( ! $user_age && (int) $hybridauth_user_profile->birthYear ){
    		$user_age = (int) date("Y") - (int) $hybridauth_user_profile->birthYear;
    	}
    
    	// update some stuff
    	update_user_meta ( $user_id, 'wsl_user'       , $provider );
    	update_user_meta ( $user_id, 'wsl_user_gender', $hybridauth_user_profile->gender );
    	update_user_meta ( $user_id, 'wsl_user_age'   , $user_age );
    	update_user_meta ( $user_id, 'wsl_user_image' , $hybridauth_user_profile->photoURL );
    
    	// launch contact import if enabled
    	wsl_import_user_contacts( $provider, $adapter, $user_id );
    
    	// store user hybridauth user profile if needed
    	wsl_store_hybridauth_user_data( $user_id, $provider, $hybridauth_user_profile );
    
    	global $wpdb;
    	$is_approved=0;
    	$cap_key = $wpdb->prefix . 'capabilities';
    	if ( $userdata = get_user_by( 'id', $user_id ) ) {
    		if ( !array_key_exists( 'pending', (array) $userdata->$cap_key ) ) {
    			$is_approved=1;
    		}
    	}
    
    	// Bouncer :: User Moderation : E-mail Confirmation ? Yield to Theme My Login plugin
    	if( get_option( 'wsl_settings_bouncer_new_users_moderation_level' ) == 101 && $is_approved == 0 ){
    		$redirect_to = site_url( 'wp-login.php', 'login_post' ) . ( strpos( site_url( 'wp-login.php', 'login_post' ), '?' ) ? '&' : '?' ) . "pending=activation";
    
    		@ Theme_My_Login_User_Moderation::new_user_activation_notification( $user_id );
    	}
    
    	// Bouncer :: User Moderation : Admin Approval ? Yield to Theme My Login plugin
    	elseif( get_option( 'wsl_settings_bouncer_new_users_moderation_level' ) == 102 && $is_approved == 0 ){
    		$redirect_to = site_url( 'wp-login.php', 'login_post' ) . ( strpos( site_url( 'wp-login.php', 'login_post' ), '?' ) ? '&' : '?' ) . "pending=approval";
    	}
    
    	// otherwise, let him go..
    	else{
    		// HOOKABLE:
    		do_action( "wsl_hook_process_login_before_set_auth_cookie", $user_id, $provider, $hybridauth_user_profile );
    
    		// That's it. create a session for user_id and redirect him to redirect_to
    		wp_set_auth_cookie( $user_id );
    	}
    
    	// HOOKABLE:
    	do_action( "wsl_hook_process_login_before_redirect", $user_id, $provider, $hybridauth_user_profile );
    
    	wp_safe_redirect( $redirect_to );
    
    	exit();
    }

    Hope that helps you out.
    Regards,
    Don

    I also have problem with facebook login…can someone help please ?

    Hi Everybody,

    I’m experiencing the exact same problem, and the fix provided by prophecy2040 doesn’t work for us.

    What could it be?

    I copied prophecy2040 instructions to a T .. . didn’t work.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Facebook-Login no more working after update !!!’ is closed to new replies.