Skip to content

LdapSource read() fixes: conditions, offsets, and counts#115

Open
ctgraham wants to merge 1 commit intocakephp:masterfrom
ulsdevteam:fix-offset-and-filter-in-ldap-datasource
Open

LdapSource read() fixes: conditions, offsets, and counts#115
ctgraham wants to merge 1 commit intocakephp:masterfrom
ulsdevteam:fix-offset-and-filter-in-ldap-datasource

Conversation

@ctgraham
Copy link
Contributor

Fix LdapSource read queries to properly handle conversion of conditions array to LDAP filter, to support offsets, and to properly handle counts (though still a hack).

  • Replace broken _conditionsArrayToString() and mostly broken _conditions() with a single working _conditionsArrayToString()
  • If an offset was passed to a search, add this into the limit, then filter out the desired records after retrieval; otherwise, Cake's paginator doesn't work.
  • Use the 'COUNT(*) AS ' . $this->name('count') hack consistently.

…ns array to LDAP filter, to support offsets, and to properly handle counts (though still a hack)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants