Horde_Kolab_Server_Object_Kolabgroupofnames::memberOfGroupAddress PHP Метод

memberOfGroupAddress() публичный статический Метод

Is the given UID member of the group with the given mail address?
public static memberOfGroupAddress ( $server, string $uid, string $mail ) : boolean
$uid string UID of the user.
$mail string Search the group with this mail address.
Результат boolean True in case the user is in the group, false otherwise.
    public static function memberOfGroupAddress($server, $uid, $mail)
    {
        $criteria = array('AND' => array(array('field' => self::ATTRIBUTE_MAIL, 'op' => '=', 'test' => $mail), array('field' => self::ATTRIBUTE_MEMBER, 'op' => '=', 'test' => $uid)));
        $result = self::gidForSearch($server, $criteria, self::RESULT_SINGLE);
        return !empty($result);
    }