new user login schema

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
User avatar
dilitimor
Veteran Member
Posts: 36
Joined: 2013-01-10 02:45
Location: Jakarta, Indonesia
Contact:

new user login schema

Post by dilitimor » 2017-04-27 08:56

This is the scenario:
There are 2 sites, site A (build with AG) as main site and site B as validation site

Any existing users in site A using default AG login schema,
For new user, site A should ask to site B about user validation using nusoap.
Site B return an xml data validation that containing registered user data (R00 = Allowed; R99 = Not Allowed; name; address; company name; etc)
If an user is registered in site B (Allowed), than site A push to sign up using data from site B, like name and address.

The big question is how could I do that kind of login schema above in AG
Any suggestion will be appreciated

User avatar
dilitimor
Veteran Member
Posts: 36
Joined: 2013-01-10 02:45
Location: Jakarta, Indonesia
Contact:

Re: new user login schema

Post by dilitimor » 2017-07-16 04:07

Solved..
All you need to do is modified one file, incCommon.php
put all necessary syntax into <function LogInMember()>
There are two big part routine, first is how to ask registration check to site B using nusoap and how to read all xml parse information.
Second is the tricky part how to copy cat membership_signUp.php function so as registered user on site B could be directly save as user in Site A (AG Site)
this method fortunately very simple, only use

sql("INSERT INTO `membership_users` set memberID='$memberID', passMD5='".md5($password00)."', email='$email', signupDate='".@date('Y-m-d')."', groupID='$groupID', isBanned='0', isApproved='".($needsApproval==1 ? '0' : '1')."', custom1='$nama', custom2='$telepon', custom3='$ktp', custom4='$npwp', comments='member signed up direct through system.'", $eo);

That it is...
Thank You All...

Post Reply