- This topic has 21 replies, 3 contibutors, and was last updated 8 years, 10 months ago by .
-
Question
Answers
- The question ‘Wordpress Social Login Integration’ is closed to new replies.
BuddyBoss Home – Web › Support Forums › Solutions › Social Learner › Wordpress Social Login Integration
I see that the new Boss 2.0 supports the WordPress Social Login plugin.
Are there any guidelines on how the plugin can be integrated into the Social Learner theme?
Specifically I would really like to add social login to the BuddyBoss Login widget. Is this possible somehow?
Is it possible to add social profile (Facebook, Google Plus, Twitter) details for a user later on?
Thanks.
Best regards,
Michael
Hello again,
I am currently testing the WordPress Social Login plugin and it seems to work fine when I login using Facebook.
I have however noticed that the profile photo does not get automatically linked to the BuddyPress profile photo. I can see the facebook photo from the backend (Users) so is it somehow possible to automatically assign the profile photo from Facebook to the BuddyPress profile?
Thanks again! 🙂
Another question is in the final step when the user is asked to ‘Create a new profile’ on the BuddyBoss site is it possible to send out an automatic welcome mail to the new user?
Best regards,
Michael
I managed to sync the profile photo by adding the following code to functions.php:
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 ) ) != bp_core_avatar_default( 'local' ) )
return true;
return false;
}
Credits: http://webdeveloperswall.com/buddypress/wordpress-social-login-facebook-profile-picture
The only thing is that it seems to slow down the loading speed of the site a bit. In theory would it be possible to save the Facebook profile photos as avatars on the site server thus reducing site load speed?
One small bug I have noticed when using WP social login. (also cleaned the added function mentioned above from functions.php as a test but the bug is inherent to Boss / SL).
Top right menu items missing – see attached image.
I found another bug. When going to Settings -> Email all the options are missing when you have registered via WP Social Login.
I know that you are busy but it would be great if you could add this to the tasklist. Thanks! 🙂
Despite the above mentioned bugs I find the WP Social Login integration pretty neat.
If possible I would still like to add social login to the BuddyBoss login widget. Any advice on this? 🙂
Hi @mln83,
Please check Plugin setting once again it have setting to fetch avatar , no need to add any functions
https://s.w.org/plugins/wordpress-social-login/screenshot-9.png?r=1283516
Regards
Pallavi
Hi @pallavi,
I use WordPress Social Login 2.3.0: https://wordpress.org/plugins/wordpress-social-login/
I hope that this is the correct plugin for Boss 2.0.3 support?
It seems to be recognized by BuddyBoss on the registration page but not by the BuddyBoss login widget.
Best regards
Michael
Hi @pallavi,
Thanks for the heads-up I have removed the added code and enabled support for BuddyPress inside WP Social Login.
This seemed to solve the problem I had with Settings -> Email not being visible.
But the other problem with the missing top right menu is still not solved. I would be grateful if you could help solve this one?
Best regards,
Michael
Moreover it would be great if it was possible to add the social login links below the BuddyBoss login widget.
Is this possible somehow?
Hi @mln83, Emails depends upon service provider like twitter do not provide emails and and please check inside Social Login documentation and support of the emails.
I have requested developers to add support of the social login buttons for BuddyBoss Login Widget.
Regards
Varun Dubey
Hi @vapvarun,
Thank you very much. It’s a minor request but it would be a nice addition to the BuddyBoss Login Widget.
Any update on the other problem with the missing top right menu? (see previously uploaded image)
I would be grateful if you could help solve this issue?
The image I am referring to can be found here:
http://buddyboss.clusterinteracti.netdna-cdn.com/wp-content/uploads/2015/11/Skærmbillede-2015-11-10-kl.-19.50.15.png
Hi @mln83 any of your active plugins is hiding WordPress admin bar, we are using admin bar to generate right drop down
Regards