I’m working on a website that has 3 user groups, each with different permissions, and the user attributes (the details that are required on registration) differ between the groups. I.e.: if you want to have access to everything on the website you must share a lot more personal info than if you just want to browse certain sections.
Problem: i need to be able to let the users "upgrade" their accounts from, let’s say a basic one, which only requires a username, email and password, to a "premium account" which requires them to give more info on themselves, like real name, ID, adress, and such.
I’m using the WebLogin PE snippet which is awesome, and i’m just wondering how can i go about building the above. How can i let a user "upgrade" his account, by providing additional personal information (which automatically moves him to an user group with wider permissions).
Can this be done relatively easily or do i need to hire a php coder to build a custom snippet? I am quite good at web development but PHP is my weakest point..
Thank your for your time
EDIT: Digging trough the forums i found a similar request from another user, to which Dr. Scotty Delicious, the creator of the WLPE snippet responded:
It can be done, but you would probably need a custom plugin fired on "onWebSaveUser". The plugin could check to make sure that there is a value in one or more of the profile fields and then add the user to a specific web group.
-sD-
Dr. Scotty Delicious, DFPA.
Now i know what must be done, but i don’t know how to do it, could anybody help me out a bit, to get me started? Like, what is the code that actually makes the user belong to a group? - i’m thinking there is where i should put a conditional to check if certain fields are filled or not, and then add a user to a specific group.
Any help would be greatly appreciated.