Duplicated user account in User Class

Author Message

Virgilio Lemos

Thursday 23 July 2009 7:01:34 pm

By mistake I have added a second User Account in the User Class template and I'm receiving the error message below (translated from portuguese version) when I try to remove the duplicated entry.
Any idea on how to fix this?

The class definition could not be saved
The following information is missing ou invalid:
* attribute '': (12) Is not possible to remove the account:
o The owner is being connected.
o The account is being used by Anonimous user.
o The account is being used by administrator user.
o You can not remove the last class thar has user accounts.

Virgilio Lemos

Tuesday 28 July 2009 5:20:42 am

Is it a data base restriction?

André R.

Tuesday 28 July 2009 6:35:20 am

Its enforced in the ezuser data type, specifically eZUserType::classAttributeRemovableInformation().

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Virgilio Lemos

Tuesday 28 July 2009 11:21:46 am

It's is possible to modify the data type to allow the correction and change it again to the original specification?
How can I do this?

Max Keil

Tuesday 28 July 2009 4:53:39 pm

Hi,

Yes it's possible:

The file is placed here "/kernel/classes/datatypes/ezuser/ezusertype.php" - the function as named before "classAttributeRemovableInformation" - on the basis of result warnings you can bypass the function and remove the attribute!

Mit freundlichen Grüßen
Best regards

Max Keil

____________________________________________________________
eZ Publish Gold Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

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 18:14:41
Script start
Timing: Jan 18 2025 18:14:41
Module start 'layout'
Timing: Jan 18 2025 18:14:41
Module start 'content'
Timing: Jan 18 2025 18:14:41
Module end 'content'
Timing: Jan 18 2025 18:14:41
Script end

Main resources:

Total runtime0.0185 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0077 587.9297152.6250
Module start 'layout' 0.00770.0044 740.554739.4453
Module start 'content' 0.01220.0043 780.000093.3047
Module end 'content' 0.01640.0020 873.304738.3047
Script end 0.0185  911.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002915.5555140.0002
Check MTime0.00126.5432140.0001
Mysql Total
Database connection0.00116.046910.0011
Mysqli_queries0.004524.382130.0015
Looping result0.00000.101910.0000
Template Total0.00179.310.0017
Template load0.00094.936810.0009
Template processing0.00084.374610.0008
Override
Cache load0.00063.482410.0006
General
dbfile0.00021.340980.0000
String conversion0.00000.065840.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