Forums / Developer / Let User editing their profiles

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