Ferenc Engard wrote:

> We are getting closer... In case of the error the outputs are:
>
> Errstr after mgd_auth_mgd(): Object does not exist
> mgd->sitegroup: 0

OK, this is the origin of the problem. At this point, Midgard issues a
query like:

   SELECT id,password FROM person WHERE username=<username> AND
   sitegroup=<sitegroupid>

and appearantly it is getting an error or 0 results from the database,
in which case it issues a NOTFOUND error.

> (In the $mgd there are two distinct attrs between a good and a bad
> query:
>
> [user] => 0, [sitegroup] => 0   OR   [user] => 9, [sitegroup] => 1
> )

When authentication fails these do indeed drop to 0.

> This error means 'authentication failure'?

Yes.

> Ok, it seems that I have the solution: I have changed the auth row to:
>
> mgd_auth_midgard("author+informed","x",0);
>                         ^^^^^^^^^
> And now it seems that it works correctly. Based on what you have
> answered to pp, I consider it as a bug (the page belongs to
> SG1=='informed'). :-p  (At least, it gives me that better feeling that
> not only I have to be blamed for this quite long thread, and the working
> hours beneath it. :)

It's a bug, not doubt about it. Why it appears is still not clear to me.
It'd be interesting to know what <sitegroupid> the query has in case of
failure.

Emile



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to