Registered User

Author Message

Nicolas OTTAVI

Wednesday 07 December 2005 6:15:23 am

Hi,

Users can register to the site I currently developping, in order to proceed purchase in the store.

How to do to:
- allow the user to change his password
- allow the user to edit his profile

I thought that the easiest way to do so was to make the user as the UserCreatorID in the [UserSettings] section, but it seems this is not possible ... (Am I wrong ? if yes let me know how to do so ... thanks)

Thanks for your help,
C.

Łukasz Serwatka

Wednesday 07 December 2005 11:05:58 pm

Hi Claude,

You will have to setup two things:
- give your users right permissions to selfedit and password for module "user", you can set it in admin interface User accounts->Roles and policies then add new policy for user role,
Module: User Function: password and Module: User Function: selfedit
- place in your template 2 links, one for password administration and one for profile administration

{def $current_user==fetch( user, current_user )}
{*Password*}
<a href={concat( '/user/password/', $current_user.contentobject_id, '/')|ezurl}>Change password</a>

{*Profile*}
<a href={concat( '/content/edit/',  $current_user.contentobject_id, '/' )|ezurl}>Edit profile</a>

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Nicolas OTTAVI

Saturday 10 December 2005 8:45:23 am

Thanks Lukasz,

I did what you said, but it seems not to work yet. I didn't mentionned that I have created a custom class for my users. Does it change anything concerning the selfedit feature ?

Thanks,
C.

Nicolas OTTAVI

Tuesday 13 December 2005 2:25:53 am

Hi there,

finally I can edit the user profile, by using an override (a copy of overrides/templates/edit/user.tpl for my custom class client). The user can now update his profile, and once it is done is redirected to the home page without Error.

Thanks,
C.

Greg McAvoy-Jensen

Wednesday 25 January 2006 11:14:28 pm

In which template does one paste that code if it is to appear with the Logout link? It looks like toptoolbox.tpl already has this sort of info in it; is there a simple way to enable it? Thank you.

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

Łukasz Serwatka

Thursday 26 January 2006 12:14:02 am

Hi Greg,

If you using top toolbar, you can add "login" tool there. Then you don't have too change templates, at least if this is enough for you. Login and Logout link should appear.

In admin interface:

1. Go to Design tab
2. Click Toolbar management
3. Choose your siteaccess from drop-down list
4. Choose Top
5. Add "Login" tool
6. Save settings

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Greg McAvoy-Jensen

Thursday 26 January 2006 8:31:19 am

Yes, thank you. I've got that. But I was trying to get the password changing and profile changing functionality. I understand how to get it from your explanation and code above, but I don't know which template it should go in. I also know that at least one existing template has this code already in it, so it there a simple switch I should do? What's best?

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.