Show the Information of the current user

Author Message

Rafael Andres Gonzalez Lopez

Tuesday 22 November 2005 5:41:14 am

In the development of an application I need to show certain information of the user who is connected nowadays to the user's interfaz of the CMS, in this area I manage to show the name of the current user and your mail, by means of following judgments:

{fetch('user','current_user').contentobject.name}
{fetch('user','current_user').email}

I am trying to show the name of the user's account (login) of the current user by means of the following judgment:

{fetch('user','current_user').contentobject.user_account}

But this does not show me anything.

Good regards to all and thanks for any help...

Clemens T

Tuesday 22 November 2005 6:07:31 am

I believe this is what you 're looking for:

http://ez.no/community/forum/developer/main_node_id_of_the_user

so..

{def $user=fetch( 'user', 'current_user' )}
User:     {$user.contentobject.name} <br />
E-mail:   {$user.email} <br />
Username: {$user.login} <br />
Group(s): {$user.groups|implode(', ')} <br />
{undef $user}

more:
http://ez.no/doc/ez_publish/technical_manual/3_6/reference/modules/user/fetch_functions/current_user

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 19:17:38
Script start
Timing: Jan 18 2025 19:17:38
Module start 'layout'
Timing: Jan 18 2025 19:17:38
Module start 'content'
Timing: Jan 18 2025 19:17:39
Module end 'content'
Timing: Jan 18 2025 19:17:39
Script end

Main resources:

Total runtime1.0440 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.0056 589.1797152.6406
Module start 'layout' 0.00560.0025 741.820339.4766
Module start 'content' 0.00811.0344 781.2969461.5234
Module end 'content' 1.04250.0015 1,242.82038.1250
Script end 1.0440  1,250.9453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.2793160.0002
Check MTime0.00120.1196160.0001
Mysql Total
Database connection0.00070.065610.0007
Mysqli_queries1.001495.9239540.0185
Looping result0.00050.0517520.0000
Template Total1.012297.020.5061
Template load0.00190.180720.0009
Template processing1.010396.772320.5052
Template load and register function0.00020.017810.0002
states
state_id_array0.00090.087810.0009
state_identifier_array0.00100.097120.0005
Override
Cache load0.00150.1458160.0001
Sytem overhead
Fetch class attribute can translate value0.00060.059520.0003
Fetch class attribute name0.00160.152120.0008
XML
Image XML parsing0.00020.020720.0001
class_abstraction
Instantiating content class attribute0.00000.000820.0000
General
dbfile0.00060.0623100.0001
String conversion0.00000.000740.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
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.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: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs