Find Answers and Get Support › Forums › Gwangi – PRO Multi-Purpose Membership, Social Network & BuddyPress Community Theme › Website Setup › Pages › Social login – Facebook
- This topic has 4 replies, 2 voices, and was last updated 6 years, 4 months ago by
alex.
-
AuthorPosts
-
alexParticipant@abourne
- 81 Topics
- 259 Posts
Had FB login issue, as attached.
This function resolved it for your communities interest:
add_filter( 'wsl_hook_alter_provider_scope', 'virtus_wsl_hook_alter_provider_scope', 10, 2 ); function virtus_wsl_hook_alter_provider_scope( $provider_scope, $provider ) { if ( $provider == 'Facebook' ) { $provider_scope_new = str_replace( ', user_friends', '', $provider_scope ); return $provider_scope_new; } return $provider_scope; }
By the way, Social login seems kind of pointless as it only pulls the basic name, email. Can it also be made to pull profile image? If so, how?
November 19, 2018 at 16:48 #3642alexParticipant@abourne- 81 Topics
- 259 Posts
In fact, it pulls data from facebook fields.
After log in, none of the profile fields are populated.
Despite the screen prompting that it will (attached).
Also, can the screen of ‘link account’ and ‘create new account’ be removed (attached)? It seems rather pointless.
November 19, 2018 at 16:57 #3645alexParticipant@abourne- 81 Topics
- 259 Posts
WP social login auto logs the user in and skips all the important fields, like choosing a role, location etc… plus redirects thereon to home page, which cannot be changed with their settings.
Am disabling it. Unless it can re-land the user onto registration forms to complete the ‘remaining’ fields not entered by Facebook?
FYI, if it may help anyone else, I came across this solution, which worked for many according to comments…
add_filter( 'bp_core_fetch_avatar', 'revert_to_default_wp_avatar', 80, 3 );//late load function revert_to_default_wp_avatar( $img, $params, $item_id ){ //we are concerned only with users if( $params['object']!='user' ) return $img; //check if user has uploaded an avatar //if not then revert back to wordpress core get_avatar method //remove the filter first, or else it will go in infinite loop remove_filter( 'bp_core_fetch_avatar', 'revert_to_default_wp_avatar', 80, 3 ); if( !emi_user_has_avatar( $item_id ) ){ $width = $params['width']; // Set image width if ( false !== $width ) { $img_width = $width; } elseif ( 'thumb' == $width ) { $img_width = bp_core_avatar_thumb_width(); } else { $img_width = bp_core_avatar_full_width(); } $img = get_avatar( $item_id, $img_width ); } //add the filter back again add_filter( 'bp_core_fetch_avatar', 'revert_to_default_wp_avatar', 80, 3 ); return $img; } /** * Check if the given user has an uploaded avatar * @return boolean */ function emi_user_has_avatar( $user_id=false ) { if( !$user_id ){ $user_id = bp_loggedin_user_id(); } if ( bp_core_fetch_avatar( array( 'item_id' => $user_id, 'no_grav' => true,'html'=> false, 'type' => 'full' ) ) != bp_core_avatar_default( 'local' ) ) return true; return false; }
http://webdeveloperswall.com/buddypress/wordpress-social-login-facebook-profile-picture
November 19, 2018 at 17:28 #3649@themosaurus- 1 Topics
- 1675 Posts
Hi @abourne,
Thank you for your feedback. However, please note that your request is related to the improvement of a third party plugin, not our theme. As theme authors, feature development for third party plugins isn’t part of the support we will provide.
To go further, we invite you to inform the plugin authors of your request on their support forums:
https://wordpress.org/support/plugin/wordpress-social-loginWe remain available to discuss requests related with the use of your theme.
Regards,
December 5, 2018 at 12:21 #4071 -
AuthorPosts
You must be logged in to reply to this topic.