Let User editing their profiles

Author Message

Sven Anderson

Monday 13 September 2004 8:55:11 am

Hello,

atm I am using following code, to let user edit their profiles:

<a href="javascript:document.user_edit.NewDraftButton.click();">My Account</a>
<form name="user_edit" method="post" action={concat('/content/edit/', $current_user.contentobject_id)|ezurl}>
<input type="submit" name="NewDraftButton" value="edit profile" style="visibility:hidden" />
</form>

I use this code, because if an user click on "My Account" and don't finish his changes with the confirm-button nor the cancel button (e.g. click at a navigation bar), a draft is stored and there will be a prompt, if the user want to edit his profile again.
The problem with this code is, that it'll create everytime the link is hit a newdraft until the limit of drafts is hit. than the user have to choose again the draft he wants to edit.

You can check this at this ez-publish site too (if you are logged on):
click at "my profile" -> "edit profile" -> click at "my profile" again (dont use the buttons "ok" or "cancel") -> "edit profile".
Now you'll be asked to chose between "edit" or "new draft".

That's what I want to suppress, so the users don't become confused and have nothing to do with drafts etc.
Is there any way around this problem?

greets,
Sven

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 19 2025 01:13:30
Script start
Timing: Jan 19 2025 01:13:30
Module start 'layout'
Timing: Jan 19 2025 01:13:30
Module start 'content'
Timing: Jan 19 2025 01:13:30
Module end 'content'
Timing: Jan 19 2025 01:13:30
Script end

Main resources:

Total runtime0.0246 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.0105 589.1563152.6250
Module start 'layout' 0.01050.0038 741.781339.4453
Module start 'content' 0.01430.0081 781.226689.3359
Module end 'content' 0.02240.0021 870.562530.3047
Script end 0.0246  900.8672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.004216.9503140.0003
Check MTime0.002710.9826140.0002
Mysql Total
Database connection0.00125.008110.0012
Mysqli_queries0.005923.945530.0020
Looping result0.00000.061110.0000
Template Total0.00176.810.0017
Template load0.00093.687010.0009
Template processing0.00083.138410.0008
Override
Cache load0.00062.577210.0006
General
dbfile0.00041.556680.0000
String conversion0.00000.045640.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