Social Connect v1.0

  • i have tried elgg_social-login. But it is fetching the user email to profile's contact email. not to the User account. So what happens is user->email remains blank in database.

    will the same happens with this one too?

  • No, in this one the email address from the profile fills in the Elgg email settings for the new user. You can also use the profile email address to look for existing users with the same email address and connect them to the profile instead of registering a new one. You just need to write a simple plugin for this... Check out the developers docs on the plugin web site and feel free to ask if you have any doubts... (you should be able to ask directly on the plugin web site)

  • I request please register one more hook for public pages.. so that your plugin will work with walled garden sites..

    function social_connect_public_pages($hook, $type, $return_value, $params) {
        $return_value[] = 'mod/social_connect/authenticate.php*';
        $return_value[] = 'mod/social_connect/vendors/hybridauth*';

    return $return_value;
    }


  • Problems with this plugin:

    1)     This plugin allows different username with the same email address to be registered in the database.

    In the user Email settings: account setting

    I am having trouble with this plugin! This plugin is allowing email duplicates in the database. A user from linkedin with same E-mail address is allowed to log in evethough the same E-mail address has been used by another user in the database. Is anyone having this issue?  but linked in username

    Does this plugin check the database to make sure that the New user’s E-mail address does not exist and if it exists it should throw an error that there is a user who is using the same email address?  

    2)      The Open ID does not work! If one clicks the plugin icon OpenID button, It loads, then it throws an error message bellow is shown!

     

     

    Something bad happen!

     Missing provider application credentials.

     

    I have tested it with google, facebook, linkedin, twitter and they all work perfectly except OpenID login!

    Anyone with the same issue?

  • Hi @Tom,

    Please do have a look at the developer's docs on the plugin homepage for more information. Here is a short summary.

    Problem 1) the plugin operates in three different ways depending on the value returned by the hook. I will change this into an option in the settings for the plugin, but for now a quick hack would be to change line 48 in start.php from this

    $proceed = elgg_trigger_plugin_hook('social_connect', 'user', $args, true);

    to this

    $proceed = elgg_trigger_plugin_hook('social_connect', 'user', $args, 'email');

    If you make this change, when the plugin finds the same email address in Elgg it will connect the profile and NOT create a new one anymore, which I think is what you wanted

    2) I have not used OpenID myself, but if you look at the HybridAuth docs on OpenID you will find that you need to specify an extra parameter for it to work. I have plans to change this into a user-friendly UI as well, but for now you need to choose the OpenID provider initially and add it to the config manually. Change line 111 of authenticate.php from this

    $adapter = $hybridauth->authenticate($provider);

    to this

    $adapter = $hybridauth->authenticate($provider, $provider_params);

    Then at line 105 add the following bit

    // if openid
    if ( $provider == 'OpenID' ) {
    $provider_params = array( "openid_identifier" => "https://openid.stackexchange.com/");
    } else {
    $provider_params = null;
    }

    Change "https://openid.stackexchange.com/" for whatever OpenID provider you want to use...

    Hope this helps. I am glad the first two issues that somebody has come up with were already addressed in my issue tracker ;-)

  • Hi Satheesh PM

    Can you explain a little more? I'm not very familiar with the idea of a walled garden, but will be happy to address the issue once I understand it ;-)

    Also, if you can be bothered, could you open a ticket here with your explanations?

  • Dear Federico, I had already send a message about that to you..

     

  • @ Federico, Thanks for your concern. I have done what you advised me and everything work well. However, WHEN USING SAME E-mail Address--- If I login with my account from Linkedin with same email address as Facebook account…. I am loged in without any problem and , With LINKEDIN login, My Elgg site Avatar that I had created  when I registered through my site is left the way I had set it and No new user is created if the E-mail is aready in the database–which is a good thing :)

    However, when I now login with facebook, with the same email address from my LINKEDIN account E-mail address, No new user is created –which is a good thing BUT, Now my avatar that I had created is replaced with facebook profile image.

     
    Any idea on how I can stop facebook account from changing or tampering with my site profile avatar?

  • Hi Tom, I'll look into it and let you know...

  • Nice recommended but how will i integrate this with themes like Independence Pro Theme for elgg 1.8 that have custom login/registration page...??

  • Hi Federico,

    Login with Yahoo is not working.

     

  • @Blesson Have you tried it already? It might work. I don't know that plugin so I can't really answer. What I can tell you is that you need to extend the login view and register view with the functionality provided by Social Connect. If you know what the login and register views are in that plugin, just extend them with 

    elgg_extend_view('whatever/the/login/view.php' , 'social_connect/connect', 501);
    elgg_extend_view('whatever/the/register/view.php', 'social_connect/connect', 499);

    Have a go and tell us how it went... ;-)

  • @Michael Never heard of it to be honest... :-( It's not in my plans but it seems to be a simple OAuth interface, so not too difficult. You should ask the question of the HybridAuth guys, they're the ones who write the provider adapters...

  • Please make Yahoo as OPEN ID providear and option to enter ID provider

  • @Satheesh PM Yahoo works for me! I don't know what is not working in your install! :-( have you double checked your configuration options?

  • @Federico Federico,

    any idea to combine with user validation by admin plugin,

    how i do that when user login via this plugin.

     

  • Hi DEEPAN, what do you mean? you don't need to validate users that logon in this way because they have been validated by the social network they connected with... or do you mean something else? sorry if i didn't get your question right...

  • Dos this plugin write in the elgg wall if i write something on facebook ?

  • @ Federico, @all

    Im using 

    User validation by admin for 1.8.X for Elgg 1.8 plugin

    http://community.elgg.org/plugins/875414/1.0/user-validation-by-admin-for-18x#comment_4320768

    when user register via social connect, they won`t login immediately, access_staus should be hidden and when admin approved only user can login.

    i go this thing, im using purpose(args['mode']==register)

    Where is the use of args['mode']==register

    you can help me......

  • @nolimitek

    The plugin doesn't yet provide this sort of integration... I'm planning it to add something along those lines in the future.

  • @DEEPAN

    I'm sorry, but I don't understand what you would like the social connect plugin to do... I understand that the admin user validation plugin disables users when they register until the admin approves them.

    So...

    1) do you find that social connect DOES NOT disable users

    OR

    2) do you not want social connect users to be disabled

    ?

    As I do not use the plugin myself, I need you to be very specific so that I can provide some help ;-)

     

  • Thanks for your reply Federico

    I want Social connect to register in my site but  at that time i have to send admin notifications to approve social people who connected with my site, while admin approve peoples profile

    (check wheather he is from his college,or school (private network) ).

    then only user can login with that social connect.

    This may reach you easy,......

     

  • does the latest version of this plugin already implement the few fixes on the comment above ? 

    i'm having a hard time to confirm that this plugin works, because i can't connect to existing users, just create new users, i have changed my email in the user already created to be the same has my twitter or facebook user, but it create a new user all the time anyway, does not connect to users.

    any chance we can see some integration from the inside also ?
    like i'm connected using usual elgg credentials, but i would like to tie my social profiles
    once connected, would that be possible ?  

  • Hi Federico. I tried Facebook and twitter with good results but I can't created a new application for "Google". Could you tell me where I can this option because if a go to https://code.google.com/apis/console/ I can't see the option create a new application.

     

    Thanks Daniel

  • Hi Daniel

    On that page, if you don't have a project yet, create one. It's a massive blue button at the center of the page called "Create Project..." or something like that.

    Once you have created your project, you need to select the API Access link on the lefthand side menu. There will be another big blue button labelled "Create a OAuth 2.0 client ID...". Click on it and choose a product name of your choice and press next (you can configure the other options later).

    Now select Web Application and press the "Create ID" button.

    In the following page, click on "Edit settings..." and provide the URLs suggested by the plugin, for example for me they were

    Redirect URIs: http://www.muroflamenco.com/mod/social_connect/?hauth.done=Google
    https://www.muroflamenco.com/mod/social_connect/?hauth.done=Google
    JavaScript origins:

    http://www.muroflamenco.com
    https://www.muroflamenco.com

    Hope this helps. If you find that I have made any mistakes, please post here again for everybody else's sake ;-) Thanks

Federico

Developer in PHP, iOS, Java, Android ~ Enjoys synchronised swimming as a hobby

Stats

  • Category: Authentication
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 5842
  • Recommendations: 29

Other Projects

View Federico's plugins