Witaj Piotras,

> want a surprise?
> 
> $useradmin =  mgd_auth_midgard("admin","pass",0);  
> // I think login and pass are 200% correct, I log with them to sitegroup with no 
>problem
> if (!$useradmin) { echo "err" .mgd_errstr(); } 
>  else { echo "errok" .mgd_errstr(); } 
> //MGD_ERR_OK
> // looks like useradmin is set
> echo "$useradmin->id"; 
> //returns nothing
> 
> 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.

> 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.

wkr,

-- 
Envida                     http://www.envida.net/
Armand A. Verstappen       Graadt van Roggenweg 328
[EMAIL PROTECTED]       3531 AH Utrecht
tel: +31 (0)30 298 2255    Postbus 19127
fax: +31 (0)30 298 2111    3501 DC Utrecht


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

Reply via email to