ElkArte Community

Project Support => Support => Topic started by: CrimeS on May 23, 2016, 05:24:17 am

Title: Updating user's group
Post by: CrimeS on May 23, 2016, 05:24:17 am
I've a question about updating user's group. I'm integrating a shop that's integrated with paypal ipn, that's going to be integrated into ElkArte (makes sense). Are there any precautions, when updating the group field in database? This would be equivalent to - payment validated, give this user a Premium status. For obvious reasons I wouldn't force to change it if a user has already a "higher rank".

Will this require only changing id_group from elkarte_members table? Or should I add it to additional_groups?

PS. I'm still finishing up the shop, so this isn't urgent yet.
Title: Re: Updating user's group
Post by: emanuele on May 23, 2016, 09:51:10 am
http://www.elkarte.net/community/index.php?topic=831.msg5942#msg5942 O:-)
Title: Re: Updating user's group
Post by: Flavio93Zena on May 23, 2016, 11:06:52 am
Welp, he does have a point, that topic is from 3 years ago O:-)
Title: Re: Updating user's group
Post by: CrimeS on May 23, 2016, 12:31:56 pm
This seems to be what I needed and it looks like all logical issues are included in that as well :D Thanks!
Title: Re: Updating user's group
Post by: CrimeS on May 24, 2016, 02:16:25 pm
Hmmm, I got to the add members to group phase, however there is some weird paypal behaviour. If I require once the SSI.php in my ipn.php, the paypal ipn won't get verified and won't receive the handshake.
Title: Re: Updating user's group
Post by: emanuele on May 24, 2016, 05:19:11 pm
Well... it's difficult to guess.
Elk itself uses SSI for subscriptions.php, so it should work.
It may be almost any thing, so some more context would be useful, for example what code are you using for your IPN?
Title: Re: Updating user's group
Post by: CrimeS on June 08, 2016, 07:13:21 am
Ehhhhh, next time please remind me to use ssi_shutdown() at the end. Everything gets verified now :D
Title: Re: Updating user's group
Post by: emanuele on June 08, 2016, 07:32:49 am
lol