Unique attributes

Author Message

Michael Scofield

Tuesday 17 June 2008 1:49:08 am

I would suggest that each attribute should have a checkbox option called "Unique", while editing or creating a class.

It could be used in forms with user registration, where, for example, the intention is to have unique e-mails between users. Because the attribute e-mail is unique, ez Publish will not permit two users with same e-mail addresses to register.

This unique feature for attributes could be used in many other situations.

Piotrek Karaś

Monday 23 June 2008 6:10:18 pm

Actually, eZ Publish by default does not allow registration of multiple accounts using one e-mail address. But also, this is a special type of security, which is embedded in the datatype itself.

I've once commited an extension that sort of does of what you're asking for:
http://ez.no/developer/contribs/datatypes/ez_unique_datatypes

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Robert Röttger@xrow.de

Monday 11 July 2011 5:10:13 am

hey,

would be nice if someone could take such a checkbox into the feature request for eZ 4.7 or so :D

ps. your extension works fine.

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 00:58:44
Script start
Timing: Jan 18 2025 00:58:44
Module start 'layout'
Timing: Jan 18 2025 00:58:44
Module start 'content'
Timing: Jan 18 2025 00:58:45
Module end 'content'
Timing: Jan 18 2025 00:58:45
Script end

Main resources:

Total runtime0.6768 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 588.9297152.6094
Module start 'layout' 0.00700.0031 741.539139.4141
Module start 'content' 0.01010.6651 780.9531562.3516
Module end 'content' 0.67520.0016 1,343.304712.1875
Script end 0.6768  1,355.4922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.5011160.0002
Check MTime0.00130.1904160.0001
Mysql Total
Database connection0.00100.142610.0010
Mysqli_queries0.629392.9704590.0107
Looping result0.00060.0951570.0000
Template Total0.642294.920.3211
Template load0.00240.357120.0012
Template processing0.639894.528020.3199
Template load and register function0.00010.021910.0001
states
state_id_array0.00080.110810.0008
state_identifier_array0.00070.108920.0004
Override
Cache load0.00200.2898150.0001
Sytem overhead
Fetch class attribute can translate value0.00050.079830.0002
Fetch class attribute name0.00120.174240.0003
XML
Image XML parsing0.00070.104430.0002
class_abstraction
Instantiating content class attribute0.00000.005940.0000
General
dbfile0.00090.1344170.0001
String conversion0.00000.001740.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs