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.

eZ debug

Timing: Jan 20 2025 12:46:20
Script start
Timing: Jan 20 2025 12:46:20
Module start 'layout'
Timing: Jan 20 2025 12:46:20
Module start 'content'
Timing: Jan 20 2025 12:46:20
Module end 'content'
Timing: Jan 20 2025 12:46:20
Script end

Main resources:

Total runtime0.0149 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 589.2891152.6406
Module start 'layout' 0.00510.0023 741.929739.4766
Module start 'content' 0.00740.0054 781.406389.3984
Module end 'content' 0.01290.0020 870.804734.3047
Script end 0.0149  905.1094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002617.1323140.0002
Check MTime0.00117.2819140.0001
Mysql Total
Database connection0.00074.582210.0007
Mysqli_queries0.001812.249530.0006
Looping result0.00000.073610.0000
Template Total0.001610.410.0016
Template load0.00085.580210.0008
Template processing0.00074.788510.0007
Override
Cache load0.00063.870510.0006
General
dbfile0.001610.439080.0002
String conversion0.00000.033640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs