Francois Deppierraz <[EMAIL PROTECTED]> wrote:
> Hi folks !
>
> I've got a strange issue with mgd_auth_midgard(), if the login fails
> then functions like mgd_get_object_by_guid()
It is not mgd_get_object_by_guid problem related.
> 1: <?php
> 2:
> 3: function show() {
> 4: $toto =
> mgd_get_object_by_guid('d03cd727cffebee3a19a784b76ffe92d');
> 5: print "mgd_errstr = ".mgd_errstr()."<br>";
> 6: print "id = ".$toto->id."<br>";
> 7: }
<? print_r($toto); ?>
pay attention for $toto->sitegroup or just <? print "SG:" . $toto->sitegroup ; ?>
> 9: print "step 1<br>";
> 10: show();
> 11: print "step 2<br>";
> 12:
> 13: if (mgd_auth_midgard('nonexistentuser', 'dfsfsdfdsffds', 0)) {
And here it only depends who You are logged in.
If mgd_auth_midgard will return false and $toto is SG0 , You should get object.
If mgd_auth_midgard will return SG0 person , You should get object whatever SG $toto
belongs.
If mgd_auth_midgard will return SGx person and $toto is SGy , mgd_errstr() will return
"OBJECT_DOES_NOT_EXIST"
Piotras
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]