> I noticed that mgd_is_member is in person functions 
> rather than in member functions looking at sources.
> And just thought that this function could have additional parameter
> to decide if we check person from mgd_get_midgard() or if we check 
> any person. As for now there is no other way like list_members , next fetch 
> and decide if person is member or not.

It already does:

<snip location="php4/person.c" line="51">

        case 2:
            if (zend_get_parameters_ex(2, &zv_gid, &zv_uid)==FAILURE) {
                WRONG_PARAM_COUNT;
            }
            RETVAL_LONG(mgd_exists_id(mgd_handle(), "member", 
                                                            "uid=$d AND gid=$d",
                                                            (*zv_uid)->value.lval,
                                                            (*zv_gid)->value.lval))

</snip>

So you can call it like:
mgd_is_member($gid); // current midgard-user
mgd_is_member($uid, $gid); // any user

Regards
  Peter

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

Reply via email to