Forums / General / how to store a new register form data ?
Joe Lindou
Wednesday 29 September 2010 8:55:22 am
Hi,
I would like to create a new register form, and not use the basic one.
I have create a new class that i named members, then in my site.ini i defined the UserClassID.
I overrided hte register.tpl file and created my own form.
My problem is that i don't how to store my form datas.
Do i use createandpublish method to store data ?
What i have to use to save the user login and password in ezuser table ?
If you could give me some piece of advice it will be cool :)Thanks.
Matthieu Sévère
Wednesday 29 September 2010 9:58:33 am
If you create a new class and change the userClassId in site.ini then calling user/register will use your new class the store data (create a new user).
Be carefull, this class needs to have a useraccount datatype to be a valid user.
-- eZ certified developer: http://ez.no/certification/verify/346216
Wednesday 29 September 2010 3:32:27 pm
Désolé j'ai peur de ne pas comprendre ton explication...
Tu veux dire quoi par user account datatype ?
Thursday 30 September 2010 12:11:47 am
A datatype is an attribute in a content class.
This means that in your new content class you need to have at least one attribute 'user_account' (which is used to store username and password)
Thursday 30 September 2010 4:42:58 am
ah oui bien sur, j'ai effectivement un datatype user_acount.
Au niveau du formulaire puis-je utiliser un formulaire perso ? ou dois-je utiliser la même syntaxe que ce qu'il y a dans le register.tpl de base.
C'est à dire des champs input de ce type :
<input type="hidden" value="352" name="ContentObjectAttribute_id[]"><input id="ezcoa-342_prenom" class="ezcca-membre_prenom ezcc-membre box" type="text" size="70" name="ContentObjectAttribute_ezstring_data_text_352" value="" />
Dans l'id l'input je sais que 342 correspond au content class attribute id mais à quoi correspond le 352 dans le name ?