change password link disappear after login

Author Message

ttkt ttkt

Monday 07 November 2005 7:45:54 pm

hi,

i have inserted a "change password" link in pagelayout.tpl. it shows on the homepage of the website.

after i login, the "change password" link disappeared, but the menu nagivation is still the same.

i would like users to be able to click on "change password" link after they have login. please advise on how do i go about it, thanks.

Nathan Kelly

Monday 07 November 2005 8:15:27 pm

Hi I needed to do something similar, I used this code below:

{def $active_user=fetch('user','current_user')}
{section show=$active_user.is_logged_in}

#Place your change pasword button here.

{section-else}

#Don't do anything here

{/section}
{undef}

Now if your user is logged in the button should appear, if not no button should be present. You may need to change the variable $active_user to suit, thats just the name I gave mine.

Hope this helps.

Cheers!

Pardon me while I burst into flames...

ttkt ttkt

Monday 07 November 2005 9:11:59 pm

hi,

thanks, it works! managed to insert it in.

Nathan Kelly

Tuesday 08 November 2005 6:45:07 pm

Glad I could Help.

Cheers!

Pardon me while I burst into flames...

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