[Solved] Avoid user password editing in content/edit

Author Message

Jeremy B.

Monday 24 August 2009 7:56:58 am

Hi,

I would like to know if anyone knows how to disable the password editing, when a user is editing his own informations ?

I assume that these fields are comming from the ezuser datatype, and displayed using ezuser.tpl. I tried to put the fields "hidden", or "disabled", but this didn't do the job, the ezuser datatype validation failed.

Can anyone help ?

Thanks for your time :)

André R.

Monday 24 August 2009 8:37:22 am

I think you can set it to hidden and set value to '_ezpassword', then it will be threated as 'not changed'.
Remember to do the as same for the password confirm input field.

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

Jeremy B.

Monday 24 August 2009 8:50:53 am

Great !

Thank you very much André :)

Is it a common functionnality or specific to the password ?

If I have an attribute 'test', and I put a value of '_eztest' in it during editing, this attribute will remains unchanged ?

André R.

Monday 24 August 2009 9:37:45 am

Specific to the password, for normal datatypes, use hidden and set its value to the value the attribute already have.

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

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

Main resources:

Total runtime0.0140 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.0044 588.1406152.6406
Module start 'layout' 0.00440.0033 740.781339.4766
Module start 'content' 0.00770.0043 780.257893.3672
Module end 'content' 0.01190.0021 873.625034.3047
Script end 0.0140  907.9297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002517.8015140.0002
Check MTime0.00117.8477140.0001
Mysql Total
Database connection0.00053.394310.0005
Mysqli_queries0.002518.120630.0008
Looping result0.00000.084910.0000
Template Total0.001812.710.0018
Template load0.00107.445410.0010
Template processing0.00075.247610.0007
Override
Cache load0.00085.573510.0008
General
dbfile0.00021.537680.0000
String conversion0.00000.056040.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