Commit Graph

69 Commits

Author SHA1 Message Date
Aleksander Machniak
55cdf1569e Support contact+group searches in all relevant places (T1360)
Before the search worked only in Addressbook, not also in Compose.
The point of the change is also to align group searches with contact searches
in that it now uses the same set of attributes. Previously groups
in Compose were searched by name only.
2016-08-08 07:12:39 -04:00
Aleksander Machniak
53b5ccfb0c Fix regression where LDAP results could be counted incorrectly when using VLV
... broken by d08bd0a51f where we added searching in users+groups in one request
2016-08-05 09:47:27 -04:00
dsoares
8e7e22c656 Avoid PHP fatal error
After last change to file `rcube_ldap.php`, my roundcube instance was getting this error:
```
PHP Fatal error:  Cannot use object of type Net_LDAP3_Result as array in ...
```
In
```php
protected function extended_search($count = false)
```
`$result = $this->ldap->search()` returns a LDAP object (whatever package we use).
If the search returns no results (and if `$is_extended_search` is false), then it gets to line 971 trying to do a `usort()` and then a `count()` on an object, instead of an array.
2016-06-27 12:44:59 +01:00
Aleksander Machniak
d08bd0a51f Searching in both contacts and groups when LDAP addressbook with group_filters option is used 2016-06-20 09:02:38 +02:00
Aleksander Machniak
7e3298753a Use ternary operator where aplicable 2015-11-14 10:08:07 +01:00
Aleksander Machniak
c8c4cafb1f Add possibility to define date format in write operations for ldap attributes (#1488741) 2015-10-09 13:44:45 +02:00
Aleksander Machniak
1b39d9a6c7 PHP7: Fixed some E_WARNING errors that previously were E_STRICT 2015-08-08 09:32:24 +02:00
Aleksander Machniak
212e332cef Get rid of array_walk() when simple foreach() can be used 2015-07-02 10:03:24 +02:00
Aleksander Machniak
d2890372c1 Fix Fatal error after last commit 2015-07-02 09:58:05 +02:00
Aleksander Machniak
6a8c4fc73b Fix issue when first search() argument is not an array 2015-07-02 09:09:24 +02:00
Aleksander Machniak
a958748947 CS fixes 2015-06-07 15:26:33 +02:00
Thomas Bruederli
0f63418b7e Use Net_LDAP3::domain_root_dn() to resolve the domain DN for the %dc variable; replaces PR #268 2015-04-29 14:02:23 +02:00
Aleksander Machniak
6cdffbf1b6 Fix "PHP Fatal error: Using $this when not in object context" 2015-03-04 11:55:52 -05:00
Thomas Bruederli
36ee2c8427 Improve LDAP search by ignoring words order in fuzzy substring matching mode 2015-03-03 14:53:02 +01:00
Aleksander Machniak
5aa1d2005b Fix parsing ldap URI for cases where hostname is non-empty 2015-02-27 10:06:30 +01:00
Aleksander Machniak
bf99c50cc1 Fix bug where empty fieldmap config entries caused empty results of ldap search (#1490229) 2015-01-21 10:29:08 +01:00
Aleksander Machniak
aafccefb88 Properly set fuzzy_search for vlv searches 2014-12-18 08:49:36 -05:00
Aleksander Machniak
9e4246d957 Code improvements and fixes (mostly unused variables and methods) 2014-11-16 14:04:53 +01:00
Thomas Bruederli
028734b25c Make LDAP errors available to the application 2014-08-18 17:21:03 +02:00
Thomas Bruederli
834fb6858e Allow to search for LDAP groups with 'group_filter' enabled 2014-08-13 13:04:24 +02:00
Jeroen van Meeuwen (Kolab Systems)
8ee8be9b86 Correct reference to old function get_dn() 2014-08-02 16:51:51 +02:00
Jeroen van Meeuwen (Kolab Systems)
6ac9395fbd Use Net_LDAP3 2014-08-02 16:46:29 +02:00
Thomas Bruederli
a2cf7c41b9 Fix accidental key replacements 2014-04-09 08:48:28 +02:00
Thomas Bruederli
1e9a59ab89 Don't remove messages from list when moving to another folder in multi-folder search mode, just update the list 2014-04-08 14:38:54 +02:00
Thomas Bruederli
532c10669b Support structured data for autocompletion results; map 'type' attribute to CSS class for autocomplete list items 2014-03-06 13:17:14 +01:00
Thomas Bruederli
8fc49e51a4 Use the right base_dn for listing records of the selected group 2014-01-16 08:49:19 +01:00
Aleksander Machniak
6b2b2eca5f Remove deprecated functions (these listed in bc.php file) usage 2013-12-22 14:12:15 +01:00
Aleksander Machniak
18b40c1a32 Fix issue where groups were not deleted when "Replace entire addressbook" option on contacts import was used (#1489420) 2013-12-04 13:58:43 +01:00
Thomas Bruederli
4c02ef0c5c Fix function calls after refactoring 2013-10-30 16:52:54 +01:00
Thomas Bruederli
3ce7c56826 Applied the (modified) patch to extend configuration possibilities of LDAP address books as suggested in #1488753:
- Add option to specify arbitrary replacements of config options with attributes from the bound user
- Allow mapping of group object class => member attribute used in these objects
- Describe the 'member_filter' property for groups config
2013-10-25 16:54:58 +02:00
Aleksander Machniak
e426ae262c Search for user DN only if one of bind_dn, base_dn, groups_base_dn settings
contains %dn variable
2013-10-04 11:51:59 +02:00
Thomas Bruederli
79367a5631 Save groups membership in VCard export (#1488509) 2013-09-08 15:36:05 +02:00
Aleksander Machniak
4287c9a2f9 Fix replacement variables in user-specific base_dn in some LDAP requests (#1489279) 2013-08-13 09:16:48 +02:00
Aleksander Machniak
3e7b9be05c Store group objectclass to member attribute mapping in one place, cs fixes 2013-07-03 14:22:17 +02:00
Aleksander Machniak
42b9ce6415 Fix groups list in contact info page - get_record_groups() result
is a ID=>Name hash and cannot be merged with list_groups() result
2013-07-03 12:00:25 +02:00
Aleksander Machniak
1b52cfc45f Support 'univentiongroup' objectclass, small code improvements 2013-06-26 15:09:22 +02:00
Aleksander Machniak
4feb8eb575 Refactoring in groups cache handling code, CS fixes 2013-06-26 10:51:29 +02:00
Thomas Bruederli
b373ac82e4 Don't query cache if static group_filter list is used 2013-06-26 09:53:42 +02:00
Thomas Bruederli
9eaf681b6b Describe group filter's name_attr in sample config; defaults to 'cn' if not specified 2013-06-26 09:10:41 +02:00
Aleksander Machniak
b200258d5a Fixed so ldap cache can be disabled
Fixed issue where ldap groups cache wasn't used correctly
2013-06-19 19:32:48 +02:00
Thomas Bruederli
8862f67513 Use the right attribute to display group names 2013-06-19 16:22:51 +02:00
Aleksander Machniak
5a6c3a169b Cache LDAP's user_specific search and use vlv for better performance (#1489186) 2013-06-19 14:05:30 +02:00
Aleksander Machniak
fae90da582 Fix debug setting in ldap classes 2013-06-19 09:11:06 +02:00
Aleksander Machniak
c64beed6bb Unify LDAP debug messages 2013-06-18 18:10:04 +02:00
Thomas Bruederli
4500b2f79b Consolidate quote_string() method usage; don't add additional filter if required field is already in search query 2013-06-18 14:33:11 +02:00
Thomas Bruederli
dd54725b21 Merge branch 'dev-advanced-ldap-groups':
- Refactoring: separated address book implementation from generic LDAP wrapper class
- Auto-detect and use VLV indices for all search operations
- Additional group configuration options for LDAP address books
- Allow address books to display a multi-level group hierarchy in the contacts list
2013-06-18 13:49:19 +02:00
Aleksander Machniak
b07426f0c5 Make LDAP cache engine configurable via ldap_cache and ldap_cache_ttl options 2013-06-06 08:58:59 +02:00
Aleksander Machniak
3725cfb245 Avoid uninitialized/unused variables 2013-05-07 15:12:22 +02:00
Aleksander Machniak
4741d17c77 Use create_function() instead of eval() 2013-05-01 13:56:35 +02:00
Thomas Bruederli
c2e1ab4765 Escape user input values when used in eval() 2013-05-01 13:26:07 +02:00