[Zope] Determining user from session object - who is logged in?

Chris McDonough chrism at plope.com
Wed Oct 12 16:58:21 EDT 2005


On Oct 12, 2005, at 4:50 PM, Gaute Amundsen wrote:

> On Wednesday 12 October 2005 20:19, Chris McDonough wrote:
>
>> On Wed, 2005-10-12 at 19:32 +0200, Gaute Amundsen wrote:
>>
>>> I thought the place to start wold be:  /temp_folder/session_data/
>>>
>>> I have built a small little thing to play with the contents of that.
>>> External method and script below.
>>>
>>> However I have not been able to figure out a way to connect these
>>> sessions with "logged in users".
>>>
>>
>> There is no built-in connection between the two.  If you want to do
>> this, you need to use a user folder implementations that keeps
>> credentials in the session.
>>
>
> Hm.. ok.
>
> So what strategy would you chose?
>
> 1) Tweak ExuserFolder to put credentials in the session.
>
> 2) Use an addScript on session_data to put credentials in the session.
>
> 3) Use 1 or 2 to put credentials somewhere else?
>
> And thanks :)

Probably 1, because it's possible for a session to be created without  
someone being logged in, and exUserFolder is probably really the only  
thing that knows when someone logs in and out.

- C




More information about the Zope mailing list