[prev in list] [next in list] [prev in thread] [next in thread] 

List:       midgard-user
Subject:    Re: [midgard] switching user id
From:       Emiliano <emile () iris-advies ! com>
Date:       2000-05-31 21:49:21
[Download RAW message or body]


> I simply want to achieve that un-authorized users can store stuff under
> a particular topic. So I want effectively to switch ot the id of the
> owner of said topic.
> 
> I believe it is wrong to simply do
> 
> $midgard->user = id;
> 
> (would that work, BTW?)

No. You can change the values of the object but it doesn't take any effect
anywhere.

> I know that I can use
> 
>   mgd_auth_midgard(username, password);
> 
> to change the id of the current user. However:
> 
> Q1: There was a way to supress sending a cookie. How again could that be
> done?

mgd_auth_midgard(username, password, 0);

> Q2: How to switch back to non-authorized mode?

mgd_auth_midgard('','',0);

Note that these two will be effective only for the page request they're
called in. Subsequent page requests will use whatever credentials the
browser sent before (which may be none).

Emile


--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org

To unsubscribe the list, send an empty email message to address
midgard-unsubscribe@greywolves.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic