[Zope] dtml-let vs. REQUEST.set

McMains, Sean smcmains@origin.ea.com
Mon, 20 Aug 2001 11:42:10 -0500


I have a Z SQL Method I'm trying to call with user_id set to the name of
whomever had been authenticated via Zope's authentication methods. If I use
dtml-let to assign a value to the user_id parameter, I get an error. But if
I use REQUEST.set to assign the value, it seems to work fine. I.e., if I try
to build the user_id value with this code:

<dtml-let user_id="REQUEST.AUTHENTICATED_USER.getUserName()">

I get this error:

Error Type: Bad Request
Error Value: ['user_id']

However, if I use this code to assign the value to user_id:

<dtml-call "REQUEST.set( 'user_id',
REQUEST.AUTHENTICATED_USER.getUserName())">

Everything seems to work fine.

So, I've got a working version in the latter, but I don't understand why it
works and the former doesn't. Can anyone lend any insight?

Sean