How do I check whether a user is logged in?

Author Message

Sander Jansen

Wednesday 16 July 2003 7:20:26 am

I can't find it anywhere in the doc's... but how do I check whether a user is logged in or not? (goal is to combine the user and admin sections by printing a set of admin buttons when someone is logged in).

Jan Borsodi

Wednesday 16 July 2003 7:52:21 am

Try
{fetch(user,current_user).is_logged_in}
it will return true or false.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

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 18 2025 16:06:45
Script start
Timing: Jan 18 2025 16:06:45
Module start 'layout'
Timing: Jan 18 2025 16:06:45
Module start 'content'
Timing: Jan 18 2025 16:06:46
Module end 'content'
Timing: Jan 18 2025 16:06:46
Script end

Main resources:

Total runtime0.8753 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 589.1641152.6406
Module start 'layout' 0.00710.0025 741.804739.4766
Module start 'content' 0.00960.8643 781.2813518.0547
Module end 'content' 0.87390.0014 1,299.33598.1250
Script end 0.8753  1,307.4609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3544160.0002
Check MTime0.00130.1537160.0001
Mysql Total
Database connection0.00110.124410.0011
Mysqli_queries0.834895.3681540.0155
Looping result0.00040.0496520.0000
Template Total0.845696.620.4228
Template load0.00160.184220.0008
Template processing0.844096.413520.4220
Template load and register function0.00020.026510.0002
states
state_id_array0.00090.106310.0009
state_identifier_array0.00070.081720.0004
Override
Cache load0.00130.150390.0001
Sytem overhead
Fetch class attribute can translate value0.00050.057320.0003
Fetch class attribute name0.00180.200730.0006
XML
Image XML parsing0.00070.079220.0003
class_abstraction
Instantiating content class attribute0.00000.001030.0000
General
dbfile0.00080.0863170.0000
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs