Hello, need your help!
CF5 have a Registraton-Demo and every one get the rights "registerd".
With this demo I like to expand a further field.
The field is "Invitationcode".
I have a other table in my Database called "dealer".
In this database there are the name of the inviter, the code for the invitationcode and the id of the usergroups.
So when someone make a registration, CF5 should check if the Invitationcode exists and when this is true it should use the usergroups-id for the user rights.
With this I know who was the inviter.
And the users of this inviter have other rights that the other one, depends of usergroups.
Example db _usergroups:
Usergroups-id: 1 / title: public
Usergroups-id: 2 / title: registerd
Usergroups-id: 3 / title: dealer1
Usergroups-id: 4 / title: dealer2
...
db_dealer
inviter-id: 1 / invitername: Georg / invitationcode = Georg2015 / usergroups-id = 3
inviter-id: 2 / invitername: Mike / invitationcode = Mike2015 / usergroups-id = 4
...
So when someone make a reservation and use the invitationcode "Mike2015" he get automaticly the usergroups-id "4".
When he have no invitationcode he get usergoups-id: "2" (registered)
An idea what I have to do?
Thanks in advance !!
CF5 have a Registraton-Demo and every one get the rights "registerd".
With this demo I like to expand a further field.
The field is "Invitationcode".
I have a other table in my Database called "dealer".
In this database there are the name of the inviter, the code for the invitationcode and the id of the usergroups.
So when someone make a registration, CF5 should check if the Invitationcode exists and when this is true it should use the usergroups-id for the user rights.
With this I know who was the inviter.
And the users of this inviter have other rights that the other one, depends of usergroups.
Example db _usergroups:
Usergroups-id: 1 / title: public
Usergroups-id: 2 / title: registerd
Usergroups-id: 3 / title: dealer1
Usergroups-id: 4 / title: dealer2
...
db_dealer
inviter-id: 1 / invitername: Georg / invitationcode = Georg2015 / usergroups-id = 3
inviter-id: 2 / invitername: Mike / invitationcode = Mike2015 / usergroups-id = 4
...
So when someone make a reservation and use the invitationcode "Mike2015" he get automaticly the usergroups-id "4".
When he have no invitationcode he get usergoups-id: "2" (registered)
An idea what I have to do?
Thanks in advance !!