how to store a new register form data ?

Author Message

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

Joe Lindou

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 ?

Matthieu Sévère

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)

--
eZ certified developer: http://ez.no/certification/verify/346216

Joe Lindou

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 ?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 10:38:20
Script start
Timing: Jan 18 2025 10:38:20
Module start 'layout'
Timing: Jan 18 2025 10:38:20
Module start 'content'
Timing: Jan 18 2025 10:38:21
Module end 'content'
Timing: Jan 18 2025 10:38:21
Script end

Main resources:

Total runtime0.9831 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 590.2344152.6250
Module start 'layout' 0.00710.0031 742.859439.4531
Module start 'content' 0.01010.9716 782.3125559.3359
Module end 'content' 0.98170.0013 1,341.648412.1406
Script end 0.9831  1,353.7891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3427160.0002
Check MTime0.00140.1473160.0001
Mysql Total
Database connection0.00110.114610.0011
Mysqli_queries0.927194.3022630.0147
Looping result0.00060.0619610.0000
Template Total0.948496.520.4742
Template load0.00200.200020.0010
Template processing0.946496.265120.4732
Template load and register function0.00020.019610.0002
states
state_id_array0.00150.154310.0015
state_identifier_array0.00120.124520.0006
Override
Cache load0.00170.1678300.0001
Sytem overhead
Fetch class attribute can translate value0.00070.066820.0003
Fetch class attribute name0.00130.132360.0002
XML
Image XML parsing0.00090.088920.0004
class_abstraction
Instantiating content class attribute0.00000.001770.0000
General
dbfile0.00190.1936160.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs