| | |
| | | return $this->result; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Get a specific contact record |
| | | * |
| | |
| | | } |
| | | |
| | | return $assoc ? $res : $this->result; |
| | | } |
| | | |
| | | /** |
| | | * Returns the last error occurred (e.g. when updating/inserting failed) |
| | | * |
| | | * @return array Hash array with the following fields: type, message |
| | | */ |
| | | function get_error() |
| | | { |
| | | $err = $this->error; |
| | | |
| | | // check ldap connection for errors |
| | | if (!$err && $this->ldap->get_error()) { |
| | | $err = array(self::ERROR_SEARCH, $this->ldap->get_error()); |
| | | } |
| | | |
| | | return $err; |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | if ($search) { |
| | | foreach ($group_cache as $group) { |
| | | if ($this->compare_search_value('name', $group['name'], $search, $mode)) { |
| | | if ($this->compare_search_value('name', $group['name'], mb_strtolower($search), $mode)) { |
| | | $groups[] = $group; |
| | | } |
| | | } |