Programmatically register a user
Permalink 1 user found helpful
I want to programmatically register new users. I set up paypal subscriptions and IPN processing. Paypal sends me back automatically created usernames and passwords. I want to register these and assign them to a premium users group. This way users who buy a subscription will instantly have access to premium content. I'm new to php and web development so I'm not sure where to start.
Thanks.
Thanks.
that's easy. Here's a sample:
Thanks! I figured it was as simple as sending a form. So I can just stick that in the php file that handles the IPN message? Does it automatically know what UserInfo is or do I need to import that somehow?
Well, I have no clue how you call your PHP script but in general (with concrete5): Never call a PHP script directly! Put it in the tools directory and call it like /index.php/tools/your_tool
That works perfectly. Is there a way to specify the groups the user should belong to?
$userData['uGroups'] = ['registered','premium'] // ?
$userData['uGroups'] = ['registered','premium'] // ?
I've updated the post above so we have everything in one post
Hi Remo,
Sorry to take this post to my own question.
My problem is that's code don't works outside concrete5, or well I don't know to use it.
In my case, I have a php program to add a new user to another system, and I need to add this same user to the concrete5 system to have in both the same user, and when the user do login in my concrete5 site, he can to use my app's in the other system, that I have to include in my concrete5 with a addon iframe type.
I don't know if I can explain my case clearly?
Thanks for patient!
Sorry to take this post to my own question.
My problem is that's code don't works outside concrete5, or well I don't know to use it.
In my case, I have a php program to add a new user to another system, and I need to add this same user to the concrete5 system to have in both the same user, and when the user do login in my concrete5 site, he can to use my app's in the other system, that I have to include in my concrete5 with a addon iframe type.
I don't know if I can explain my case clearly?
Thanks for patient!
Answered on your other post:https://www.concrete5.org/community/forums/5-7-discussion/need-to-ca...