RE: [Zope] authenticated_user in Z SQL method not defined
Here's what it should read.. SELECT foo FROM users WHERE username=<dtml-sqlvar AUTHENTICATED_USER type="string"> Thanks, Derek Wilson -----Original Message----- From: Christoph Landwehr [mailto:chris-zopemailing@gmx.de] Sent: Friday, October 17, 2003 8:07 AM To: zope@zope.org Subject: [Zope] authenticated_user in Z SQL method not defined Hi, I'm using the exUserFolder together with a PostgreSQL-db to log in users. Works so far. With <dtml-var "AUTHENTICATED_USER.getUserName()"> I get the username which is the same as the field "username" in the db users. But I can not use AUTHENTICATED_USER in an sql-querry like SELECT foo FROM users WHERE username=<dtml-var "AUTHENTICATED_USER.getUserName()" sql_quote>; Why is AUTHENTICATED_USER not availabel in Z SQL methods? Traceback (innermost last): * Module ZPublisher.Publish, line 98, in publish * Module ZPublisher.mapply, line 88, in mapply * Module ZPublisher.Publish, line 39, in call_object * Module Shared.DC.ZRDB.DA, line 328, in manage_test * Module Shared.DC.ZRDB.DA, line 306, in manage_test * Module Shared.DC.ZRDB.DA, line 415, in __call__ * Module DocumentTemplate.DT_String, line 474, in __call__ * Module DocumentTemplate.DT_Var, line 221, in render * Module DocumentTemplate.DT_Util, line 201, in eval __traceback_info__: AUTHENTICATED_USER * Module <string>, line 2, in f Error, exceptions.NameError: global name 'AUTHENTICATED_USER' is not defined Regards Christoph _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (1)
-
Derek S. Wilson