Forums / Developer / Registering a custom user

Registering a custom user

Author Message

Pål Øystein Carlsen

Thursday 13 November 2003 3:59:20 am

Well I have considered it, and I do not belive this is my problem. The reason is that I simply do not get anything out, not even the standard user criteria.

Besides there seems to be som kind of weird lag regarding updating the ini file. I have now gone back to the original setting, which I have used earlier, but I still can't see anything else than the two buttons. I have manualy cleared cache files and removed the override settings. Strange indeed.

Just to make sure I'll download the mysql manager and have a look, I haven't got it installed right now.

Pål Øystein Carlsen

Thursday 13 November 2003 6:20:33 am

Great news!
It works!!!

I have no idea why it works this time, but it does.
My site.ini.append looks like this:
[UserSettings]
RegistrationEmail=enabled
DefaultUserPlacement=53
UserClassID=17

I have not edited the standard register.tpl file , but just overriden it with a copy of its content.

What I find funny is that I have just small changes to the ezuser.tpl file. I override it to and the only changes I have done are the following:
<input type="hidden" name="ContentObjectAttribute_data_user_login_{$attribute.id}" value="{$attribute.content.user}" />
is replaced with:
<input type="hidden" name="ContentObjectAttribute_data_user_login_{$attribute.id}" value="{$attribute.content.bruker}" /> where "bruker is my name for the user datatype in the customised class.

This is done twice in the file overriding ezuser.tpl and I changed the similar ending of email to match my word for it in my custom class.

Weird, I was certain I was going to have to add similar input types for my other attributes like "occupation" "address" etc. But no, they just appeared. Why I do not really understand...

Anyway thanks for all your help, and if my explanation is somewhat confusing or incomplete please post so I can elaborate. Perhaps this thread can be usefull for other people(that way I can pretend my frustration has not been completely wasted)

Pål

Johan Grasmo

Wednesday 03 December 2003 6:28:21 am

Hi,

I've also got problems registering a custom user.
Let me give you an overview of what I'm trying to do.

I've put up a site with sitemap, news, guestbook etc. This part works perfectly.

The site will have three user types in addition to the administrator group: Freelancer, client and sponsor. Each of these types have their own registration-page, but will be using a common login-interface. The types will also access to user-specific pages, but that's not my main problem here.

I've scrounged the forums for examples of a site with different user type registrations, but I haven't found anything. So for now I'll settle to manage the registration of the "Freelancer" user.

I've created the Freelancer-user in the "User" class and it has been given the user rights. I've also overridden -user/register.tpl and -content/datatype/edit/ezuser.tpl and the override.ini.append has been updated to reflect this. I have checked that it really uses these templates. When I access the /user/register-page, I get the signup of the "default" user - not my Freelancer-user. I've changed the site.ini.append file to:

[UserSettings]
DefaultUserPlacement=144
UserClassID=18
UserClassGroupID=2

But still it shows the "default" registration page.

My questions are:
- Why don't I get the "Freelancer" registration page ?
- Is it possible to create three registration-pages, one page for each user-type ?
- Why isn't this better documented ?

When I look at how ez handles users and user-groups, I'm positive that ez supports what I'm doing but I don't know how to do it :-)

Thanks,

Johan

eZ debug

Timing: Jan 31 2025 05:53:28
Script start
Timing: Jan 31 2025 05:53:28
Module start 'content'
Timing: Jan 31 2025 05:53:28
Module end 'content'
Timing: Jan 31 2025 05:53:29
Script end

Main resources:

Total runtime0.2015 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0090 589.5000180.8359
Module start 'content' 0.00900.0124 770.335998.1563
Module end 'content' 0.02130.1801 868.4922527.0234
Script end 0.2014  1,395.5156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00371.8583200.0002
Check MTime0.00150.7236200.0001
Mysql Total
Database connection0.00200.998910.0020
Mysqli_queries0.132665.81471410.0009
Looping result0.00150.75811390.0000
Template Total0.179789.110.1797
Template load0.00110.526010.0011
Template processing0.178688.619210.1786
Override
Cache load0.00070.324010.0007
Sytem overhead
Fetch class attribute can translate value0.00060.302710.0006
XML
Image XML parsing0.00040.207910.0004
General
dbfile0.01839.0606200.0009
String conversion0.00000.003030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs