Forums / Developer / Custom roles for new users.

Custom roles for new users.

Author Message

Tristan Koen

Friday 09 May 2003 7:05:47 am

I am somewhat new to eZ Publish, and have run into a problem I am hoping someone here can shed some light on.

1. Is is possible to automatically assign a user to a role other than the guest role when (s)he registers?

2. Is it possible to automatically assign users to custom roles depending on the information provided at registration? For example if a user simply provides a username and an email address, s(he) is assigned to role A. If (s)he provides username, email address and company, (s)he is assigned to role B, etc.

Any guidance/suggestions from experienced users would be greatly appreciated.

Jo Henrik Endrerud

Monday 12 May 2003 5:18:40 am

New users are placed in a usergroup (defined by the DefaultUserPlacement variable in the [UserSettings] block in site.ini). You can assign as many roles as you want to this usergroup, this will again make sure that all roles assigned to the usergroup are assigned the new users.

I don't think it is posible to automaticly assign roles based on the user information he/she provides. This can be solved by creating a custom event in a workflow that assigns the user to a spesific usergroup. To do this you will have to do some programming.

Jo Henrik Endrerud | System Developer @ Seeds Consulting | http://www.seeds.no