Extending User Classes

Author Message

Tristan Koen

Wednesday 11 June 2003 6:11:45 am

The basic user class has attributes for an users name, email address and password. How would one go about extending the user class to include additional attributes?
For example, a user might use forums. From the forum, we may wish to store attributes against the user that record the number of posts, or possibly an ICQ number.
On the same website, we may have a store, for which we would require a delivery address for that user.

What is the best way to allow customisation of each user? i.e. we would have some 'basic' users, some users with 'forum' attributes, some users with 'store' attributes and some users with everything.

I am still desperately trying to come to grips with ezPublish, so please answer as if you are talking to a complete idiot.

Thanks

Jan Borsodi

Wednesday 11 June 2003 7:44:37 am

Extending user (as with all content objects) are done using the class edit interface (Use the setup tab at the top).
You can edit the User class and add more attributes. If you wish you can also duplicate the class to have one class per user type or you could add an attribute which decides the type of the class.

You can take a look at this for some examples:
http://ez.no/manual/user/everyday

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

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 31 2025 00:32:09
Script start
Timing: Jan 31 2025 00:32:09
Module start 'layout'
Timing: Jan 31 2025 00:32:09
Module start 'content'
Timing: Jan 31 2025 00:32:09
Module end 'content'
Timing: Jan 31 2025 00:32:09
Script end

Main resources:

Total runtime0.0342 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 588.1250151.2109
Module start 'layout' 0.00540.0048 739.3359220.6719
Module start 'content' 0.01020.0223 960.0078997.7578
Module end 'content' 0.03240.0017 1,957.765629.9922
Script end 0.0342  1,987.7578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00288.1160140.0002
Check MTime0.00113.2051140.0001
Mysql Total
Database connection0.00061.672310.0006
Mysqli_queries0.00339.622330.0011
Looping result0.00000.066910.0000
Template Total0.00123.610.0012
Template load0.00102.827310.0010
Template processing0.00020.730510.0002
Override
Cache load0.00071.953210.0007
General
dbfile0.006318.475180.0008
String conversion0.00000.030040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

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

Time used to render debug report: 0.0001 secs