[Zope-CMF] login programmatically
marc lindahl
marc@bowery.com
Thu, 26 Apr 2001 13:02:21 -0400
You know how, after you register, there's a page with a link to immediately
log on? Perhaps you can take a look at that stuff, and use that link in
your script to log the person on and proceed to do whatever...
> From: seb bacon <seb@jamkit.com>
> Date: Thu, 26 Apr 2001 17:55:10 +0100
> To: Ivan Cornell <icornell@yahoo.com>
> Cc: zope-cmf@zope.org
> Subject: Re: [Zope-CMF] login programmatically
>
> * 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
>
> _______________________________________________
> Zope-CMF maillist - Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
>
> See http://www.zope.org/Products/PTK/Tracker for bug reports and feature
> requests