Wednesday 25 June 2003 1:17:51 am
Im working on getting users to edit their own profile on the user site - not via the admin interface. My users are a new class, not class 4. I have a tpl file overriding 'design/standard/content/edit.tpl'. When i want my user to edit their profile I force the creation of a new draft by means of clicking:
<form method="post" action="{concat('/content/edit/', $current_user.contentobject_id)}">
<input class="button" type="submit" name="NewButton" value="New draft" /> </form> This displays my edit.tpl with my user profile and contains the submit line: <input type="submit" name="PublishButton" value="Update my profile" /> which should publish my users changes. But it doesn't do this. When I query the versions using 'content/versions/' I see that that draft remains a draft. If i log in to my user site as an admin and attempt the same procedure the profile does indeed get published. I've tried this with a different admin user and the same happens again. If i give my ordinary user all role privileges (* * *) it fails to publish so it appears privileges have nothing to do with this, only user group... I've tried editing my users contentobject so that the owner is itself but this doesn't work. The php code i've looked at doesn't seem to indicate how this can be done easily so at an end for creating some operator to help out... Has anyone tried this yet? All help appreciated, and beers at summer conference forthcoming ;)
paul
|