[Zope-CMF] login programmatically

seb bacon seb@jamkit.com
Thu, 26 Apr 2001 17:55:10 +0100


* Ivan Cornell <icornell@yahoo.com> [010426 18:15]:
> 
> --- seb bacon <seb@jamkit.com> wrote:
> > I need to log the user in as part of the the registration process,
> > rather than have them click a link at the end.  I can't for the life
> > of me work out how to do this.  Do I have to raise an Unauthorised
> > error in order to trigger the login mechanism?  Can anyone help?
> > 
> 
> Not sure, but you could try doing a RESPONSE.redirect('the url you
> normally click on') at the end of the register method. This should work as
> the userid/password are passed as get parameters.

thanks for the idea, but it's not really what I need.  I want to add
some content using invokeFactory just after someone's registered, but
since they're the Anonymous User it won't work.  So I need to get them
logged in right in the middle of a function, rather than at the end of
the process.  Or perhaps I shouldn't use invokeFactory, but it's so
neat.

cheers

seb