[Zope] getUser Argument in ZPT

Jens Vagelpohl jens at zope.com
Wed Jan 7 10:11:51 EST 2004


> I want to give the name of the user currently logged in as an argument 
> to an Z
> SQL-Method in a ZPT.
> Like that:
>
> tal:repeat="report here/reports/getReportsByUser_sql(here/getUser)"
>
> But this in incorrect. How can I do this?
>

This is explained in the PageTemplates documentation. Inside the 
template you have the bound variable "user" that is bound to the 
current logged-in user. So if you need the username you would do 
here/reports/getReportsByUser_sql(user/getUserName)

jens
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2355 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20040107/92b37d86/smime.bin


More information about the Zope mailing list