> > strange?
> nope.
> use: if(mgd_auth_midgard("admin","pass",0)) $useradmin= mgd_get_midgard();
>
> and you will get an id. mgd_auth_midgard returns true or false, not an
> object.
yes, correct.
>
> > Just have a look what is in mysql log:
> > 13 Query SELECT admingroup FROM sitegroup WHERE id=2
> > 13 Query SELECT id,password FROM person WHERE username='admin' AND
>sitegroup=2
> > 13 Query SELECT gid FROM member WHERE uid=10 AND sitegroup in (0, 2) ORDER
>BY gid DESC
> >
> > sitegroup=2? how?
>
> because your host is in that sitegroup. if admin is the rootuser then use
> admin*sitegroupname in mgd_auth_midgard.
Armand, I want authenticate root, superuser or whatever it is called.
I do not need SG auth in this case.
Besides:
"
mgd_auth_midgard -- Authenticate a user
Description
bool mgd_auth_midgard (string username, string password, boolean [sendcookie])
[.....]
Warning
You should call this function before any content is sent. This function will
silently fail if called after. "
I moved all codes to code-init. code -global is not present at this host, so I am sure
that
I send all data before any others.
In brief: root authentication fails everytime.
Piotras
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]