コード例 #1
0
 /**
  * Searches for a user-entry based on the member-id from the group.
  *
  * @param string The member id which is associated to a group (mostyl the DN)
  *
  * @return stdClass User-entry or NULL
  */
 protected function p_resolveGroupMemberId($memberId)
 {
     // Execute search.
     $found = parent::objectSearch($this->connection, $memberId, $this->users_search_filter, $this->users_attributes, 1);
     if (!is_array($found) || count($found) <= 0) {
         error_log("Can not resolve member ID. member-id={$memberId}; filter={$filter};");
         return null;
     }
     return $found[0];
 }
コード例 #2
0
 /**
  * Searches for a user-entry based on the member-id from the group.
  *
  * @param string The member id which is associated to a group (mostyl the DN)
  *
  * @return stdClass User-entry or NULL
  */
 protected function p_resolveGroupMemberId($memberId)
 {
     // Create filter.
     $filter = $this->groups_to_users_attribute_value . '=' . $memberId;
     $filter = '(&(' . $filter . ')' . $this->users_search_filter . ')';
     // Execute search.
     $found = parent::objectSearch($this->connection, $this->users_base_dn, $filter, $this->users_attributes, 1);
     if (!is_array($found) || count($found) <= 0) {
         error_log("Can not resolve member ID. member-id={$memberId}; filter={$filter};");
         return null;
     }
     return $found[0];
 }