[Zope] Detecting acl username

Christopher Petrilli petrilli@digicool.com
Mon, 27 Sep 1999 09:52:16 -0400


> Michael Fox wrote:
>> 
>> Hi,
>> 
>> Is it possible to output a username once a acl user has logged in?
>>
>> Example - If my login is Bill, once I enter the secure area of the
>> site, it could say - Hi Bill
>>
>
> Hi <dtml-var AUTHENTICATED_USER>.

Not to tramps on our illustrious developer, but this is a bad idea... you
should instead use:

    <dtml-var AUTHENTICATED_USER.name>

or

    <dtml-var "AUTHENTICATED_USER.getUserName()">

The reasons for this are multitudinous, but largely derived from behaviour
of more advanced user mechanisms, like LDAP.

Chris
--
| Christopher Petrilli        Python Powered        Digital Creations, Inc.
| petrilli@digicool.com                             http://www.digicool.com