[ZPatterns] LoginManager: programmatically logging someone in

Jean Jordaan jean@upfrontsystems.co.za
Tue, 21 Jan 2003 17:23:29 +0200


Hi

 >> If you're using cookies, you need to set the cookie (and perhaps
 >> issue a redirect to the desired page).

This is what I settled on::

     for login_method in context.acl_users.loginMethodsList:
         if login_method.id == 'Basic Cookie Login':
             login_method.setCookie(REQUEST, user.uid, password)

It seems to work fine.

-- 
Jean Jordaan
http://www.upfrontsystems.co.za