Forums / Developer / Editing a user profile

Editing a user profile

Author Message

Paul Forsyth

Tuesday 24 June 2003 12:00:10 am

Ez 3.2 (rev2767)

Im having problems editing a users profile on my user site. As expected this works fine on the admin site.

My users can log in and i want them to edit their personal details. I was thinking of using a line such as:

http://my_site/user/edit/14

to get into the edit part and then customise the templates as required. 14 here is for the admin, for example.

This link gets me into the user profile for the admin user and asks me if i want to 'Edit Profile', 'Change Password', 'Change Settings'. 'Change Password' and 'Change Settings' work as expected.

Clicking 'Edit Profile' brings me to a choice of drafts with the uri:

http://my_site/content/edit/14

Selecting a draft redirects to:

http://my_site/content/edit/14/2 (2 being my example draft)

At this point the kernel seems to either load up my default pagelayout.tpl or redirects my page to:

http://my_site/content/versions/14/2

where it again loads up my default pagelayout.tpl, which is way of saying 'page not found'.

I just cant seem to get the kernel to move on to allow me to edit my user object. When i try to edit the user/draft the kernel seems to give up and point me to my default pagelayout.tpl.

Reading around the forums led me to believe it may be a site.ini setting of some sort, but after trying a few things with PolicyOmit and Im still stuck.

User permissions are not a problem here (i think). Ive tried with ordinary users (with edit permissions) and with the admin user and its the same failure.

I don't receive any errors that indicated what the problem is.

I had a thought it may be a section issue since users are in a different section in the admin...?

Is there a simple .ini switch i can try here?

Has anyone else got this to work yet with 3?

Many thanks,

Paul

Btw, i've noticed this works as expected on the demo site, demo.ezpublish.no... still to try locally with 3.2.

Paul Forsyth

Tuesday 24 June 2003 4:50:58 am

Just tried out a fresh db of rev 2795 of the latest svn and installed the demo data.

When i logged into the forums and then changed the url to goto user/edit/14 i found that i could eventually edit my profile.

BUT, then i noticed the text 'PAGELAYOUT' on the screen. Having a look at the default pagelayout.tpl in 'design/demo/templates' I find that indeed that text is there, along with a {$module_result.content}. I didnt have this in my default pagelayout and when i add it I find that I can now edit my profile....

Another but, this is not what i want. I want to edit my profile from within the specified pagelayout, so I added an override for section 2, the users section...

# General Overrides
[pagelayout_mysite]
Source=pagelayout.tpl
MatchFile=pagelayout_mysite.tpl
Subdir=templates
Match[section]=1

[pagelayout_test]
Source=pagelayout.tpl
MatchFile=pagelayout_mysite.tpl
Subdir=templates
Match[section]=2

and bingo, it works :)

I'll add this to the cont docs later today.

Paul

Tony Wood

Tuesday 24 June 2003 4:59:55 am

Nice going Paul :)

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future