[Catalyst] Accessing the catalyst user data from a template

Octavian Rasnita orasnita at gmail.com
Mon Apr 18 05:18:36 GMT 2011

From: Adam Jimerson =

  I am trying to display display information about the user currently logge=
d into my catalyst app but for some reason it is returning blank (or even n=
ull).  I am trying to display the uniqid (user id) and username of the curr=
ent user.  From my template I am calling [% c.user.object.username %] and [=
% c.user.object.uniqid %] respectively.  I know that my authentication is w=
orking because the "$c->user_exists()" calls in my controller is passing. =

  You need to use:

  [% c.user.get('uniqid') %]


  [% c.user.get('username') %]

  The c.user object also has other methods like id() and get_object() that =
might help you.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110418/c4b2d=

More information about the Catalyst mailing list