Forums / General / user can choose a usergroup on signup?

user can choose a usergroup on signup?

Author Message

Daniel Lausch

Tuesday 17 October 2006 6:30:17 am

hi guys.

how is this possible?

im a eznoob :-(

if a user signup to my sitee he have to be able to choose a usergroup like premium/default

greetz

Lausch

Claudia Kosny

Thursday 19 October 2006 10:16:31 am

Hi Daniel

Unfortunately I don't think this is easy to do as you would have to write this functionality yourself. So you need to have a good knowledge of PHP and the will to plow through some EZ code to get an understanding for the inner workings.

My idea (thoroughly untested) would be to use the customedithandler
http://serwatka.net/index.php/en/blog/ez_publish_3_8_new_custom_edit_handler
to fetch the node of the published user object and then move this node to the respective user group. Moving a node using PHP is pretty simple, you just use something like $currentNode->move($newParentNodeId);

There might be one big problem: I don't know how the user and it's user group are connected. If it is just by placement, similar to an article and it's parent folder, the above idea should work ok. If there is another connection I don't know what it is and how to change it depending on some user input.

Good luck

Claudia

Paul Borgermans

Thursday 19 October 2006 10:33:24 am

Hi

There might be one big problem: I don't know how the user and it's user group are connected.
 If it is just by placement, similar to an article and it's parent folder, the above idea should 
work ok. If there is another connection I don't know what it is and how to change it depending
on some user input.

Indeed, users are just content objects and the node placements defines to which group they belong. It is just the user/group/role related functions which take this into account

hth

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Claudia Kosny

Thursday 19 October 2006 11:08:32 am

Thanks Paul, that is good to know.

Claudia