On Mon, 1 May 2000, Armand A. Verstappen wrote:

> > I have a bit of code in a navigation layout-element:
> >
> > 13: <?
> > 14:    if($list =
> >
> st_pages(140)){ 
> > 15:    while($list->fetch()){  
> > 16:      if($list->name != "nomenu") { ?> 
> > 17:      <strong><a href="&(ghost.prefix);/&(list.name);" 
>class="navi">&(list.name);</a></strong><br> 
> > 18:    <? } } } 
> > 19: ?> 
> > 
> > It basically lists all pages under the rootpage, accept for the nomenu
> > page. This used to work fine, until I started to use 
> > mgd_auth_midgard("username","password",1) somewhere else in the site.
> > Now it just works when someone is logged on (received a auth_cookie),
> > but when that cookie is reset,  mgd_list_pages(140) above will not
> > return an object. Before I started playing with logins $midgard->user
> > always was 0, and there where no problems, now when someone is not
> > logged in $midgard->user is 0 too.

mgd_auth_midgard(....,1) must be used before any page content is output,
since it will send a cookie in the headers. This may be related to your
problem. Another issue could be that after the mgd_auth_midgard you may
have logged yourself out and fail to fetch things because of that.

> I am using mgd_auth_midgard("=","",1) to 'unlogin' a person. This
> results in the user sending a cookie that does not succesfully
> authenticate. Because of that Midgard apparently decides to not allow me
> to perform the mgd_list_pages function. 
> Is there a way to remove the users cookie?

To forcibly remove the cookie, use mgd_auth_midgard("","",1), which will
anonimize the currently logged in user and send a cookie to that effect to
the users' browser. The cookie won't be deleted, though.

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
[EMAIL PROTECTED]

Reply via email to