Extending Elk => Addons => Topic started by: ahrasis on March 24, 2017, 08:36:41 am
Title: [ADDON] OASL - ONE ALL SOCIAL LOGIN
Post by: ahrasis on March 24, 2017, 08:36:41 am
OASL - ONE ALL SOCIAL LOGIN is an addon for multiple social login which can be registered and set at https://app.oneall.com/signin/ and the relevant social media.[1]It is free up to 2,500 unique users per year.[2].
This is a non-stable-alpha-package but do not use it in an active forum of yours, unless you really know what you are doing. It is attached below and will be updated only if I know how, so do contribute, at least by reporting errors.[3].
2 You can upgrade to premium service for more but I am not promoting this.↵
3 I hope this can be a start for coding multiple social login / registration to ElkArte forum whether using Hybridauth as suggested by @emanuele or something similar/better.↵
Title: Re: [ADDON] OASL - ONE ALL SOCIAL LOGIN
Post by: emanuele on March 24, 2017, 11:14:07 am
I suggest many things, not that I can keep up with the expectations! xD Anyway good job! :D
Title: Re: [ADDON] OASL - ONE ALL SOCIAL LOGIN
Post by: ahrasis on March 26, 2017, 07:16:53 am
Title: Re: [ADDON] OASL - ONE ALL SOCIAL LOGIN
Post by: Spuds on March 26, 2017, 09:02:49 am
Yes please continue !
This version has several features which I have not done with HybridAuth and it will be good to know what features / control folks want use. Plus this one has some learning history with it since its been around, some of that can be useful.
Title: Re: [ADDON] OASL - ONE ALL SOCIAL LOGIN
Post by: ahrasis on March 27, 2017, 03:14:44 am
I learned some code from your Social Login @Spuds and from that I added ip and ip2 in the new version of this addon.
Adding user via facebook will get error 500 but after a refresh, the user is logged in.
I think the following is the fix in the sdk file but it doesn't import the avatar if I am using it. If I am not using it, the addon will import the avatar, but with the above error 500:
Title: Re: [ADDON] OASL - ONE ALL SOCIAL LOGIN
Post by: emanuele on March 27, 2017, 03:42:11 pm
1.0 or 1.1?
Title: Re: [ADDON] OASL - ONE ALL SOCIAL LOGIN
Post by: ahrasis on March 27, 2017, 07:32:40 pm
Tested this on 1.0.
Title: Re: [ADDON] OASL - ONE ALL SOCIAL LOGIN
Post by: emanuele on March 29, 2017, 05:08:50 am
Can you have a look what are the surroundings of line 778 in your Members.subs.php? And post the relevant query? (I think you are using a testing one and may be slightly different from the one in the repo right now.)
Title: Re: [ADDON] OASL - ONE ALL SOCIAL LOGIN
Post by: ahrasis on March 30, 2017, 05:13:27 am
Yes. After modification, here is the the line from 754 to 800:
Quote // Call an optional function to validate the users' input. call_integration_hook('integrate_register', array(&$regOptions, &$theme_vars, &$knownInts, &$knownFloats));
// Register them into the database. $db->insert('', '{db_prefix}members', $column_names, $values, array('id_member') <--- line 778 ); $memberID = $db->insert_id('{db_prefix}members', 'id_member');
// Update the number of members and latest member's info - and pass the name, but remove the 's. if ($regOptions['register_vars']['is_activated'] == 1) updateMemberStats($memberID, $regOptions['register_vars']['real_name']); else updateMemberStats();
On the db error, at the moment I'm a little lost. I guess the error log doesn't give anything more than that. The problem is with the preg_replace_callback of the insert, but the insert should not be able to create such an error I think...
Title: Re: [ADDON] OASL - ONE ALL SOCIAL LOGIN
Post by: ahrasis on March 30, 2017, 09:59:27 pm
Mentioned that in reply#4 as a solution for error 500, but as mentioned there as well, the avatar doesn't shows if I am using that option. I haven't look into this for few days but I will compare some more with @Spuds Social Login version and see what EA related code OASL might be missing or something later.
Title: Re: [ADDON] OASL - ONE ALL SOCIAL LOGIN
Post by: emanuele on March 31, 2017, 07:15:28 am
This second line of the code is already in the function twice and the require once is what I added, not the other way around. It failed to show the avatar.
I also tried this way and it also failed to show the avatar: