getting the login name of a user instead of the real name

Author Message

Pascal Specht

Tuesday 20 November 2007 10:02:56 am

Hi friends,

I'd like to retrieve the account login name of a user instead of his/her real name.
I managed it to retrieve the user object, but then I'm stuck I don't know how to get to the login attribute,
which doesn't seem to exist in this class...

Any ideas how to retrieve the login name from there?

    {def $user=fetch('content', 'object', hash( 'object_id', $owner.id ) )}

Thanks in advance!

</pascal>

André R.

Tuesday 20 November 2007 10:30:31 am

Have you tried looking in the data_map ???

$user.data_map.user_account.content.login

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Pascal Specht

Wednesday 21 November 2007 12:32:44 am

Hi André,

Works like a charm! Thanks a lot! I had looked into the data_map through attribute('show') but was missing the .content. in my formula.

Thanks a lot,
</Pascal>

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 31 2025 04:35:56
Script start
Timing: Jan 31 2025 04:35:56
Module start 'layout'
Timing: Jan 31 2025 04:35:56
Module start 'content'
Timing: Jan 31 2025 04:35:56
Module end 'content'
Timing: Jan 31 2025 04:35:56
Script end

Main resources:

Total runtime0.0146 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.0050 588.3906151.2422
Module start 'layout' 0.00500.0030 739.632836.7109
Module start 'content' 0.00800.0052 776.343890.3438
Module end 'content' 0.01320.0013 866.687533.9922
Script end 0.0145  900.6797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002416.2634140.0002
Check MTime0.00107.1451140.0001
Mysql Total
Database connection0.00064.316210.0006
Mysqli_queries0.002818.935230.0009
Looping result0.00000.081810.0000
Template Total0.00107.010.0010
Template load0.00085.489310.0008
Template processing0.00021.461110.0002
Override
Cache load0.00053.486610.0005
General
dbfile0.00117.807780.0001
String conversion0.00000.055640.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