Hi,
I just want to automatically login a user from a XRON Method
and then make some other things that because of the Zope
security restrictions can't be done as the "anonymous" user.
I've searched in the newsgroup but the only answers are by
using cookies.
 
I've tried the following code but it only works when I execute it
from a web browser:
 
<dtml-if expr="portal_membership.isAnonymousUser()">
  <dtml-call "RESPONSE.setCookie('__ac_name','myUser')">
  <dtml-call "RESPONSE.setCookie('__ac_password','myPassword')">
  <dtml-call "RESPONSE.redirect('myMethod')">
<dtml-else>
  My code
</dtml-if>
 
This also:
 
External method:
def loginCronUser(self):
  self.REQUEST.RESPONSE.setCookie('__ac_name','myUser')
  self.REQUEST.RESPONSE.setCookie('__ac_password','myPassword')
But I always get the following error message:
Failed to trigger event.
Type=bci.ServerError
Val=302 (File: Unknown Line: Unknown)
I guess the problem is that XRON Methods don't do that through a web
browser, so the cookie can't be set up.
 
Is there any other way of doing it?
 
Thanks in advanced,
Josef.