diff --git a/library/Icinga/Authentication/User/LdapUserBackend.php b/library/Icinga/Authentication/User/LdapUserBackend.php index 930ac4c99..11fc0093e 100644 --- a/library/Icinga/Authentication/User/LdapUserBackend.php +++ b/library/Icinga/Authentication/User/LdapUserBackend.php @@ -190,24 +190,6 @@ class LdapUserBackend extends LdapRepository implements UserBackendInterface, In ->setFilter($config->filter); } - /** - * Return a new query for the given columns - * - * @param array $columns The desired columns, if null all columns will be queried - * - * @return RepositoryQuery - */ - public function select(array $columns = null) - { - $query = parent::select($columns); - $query->getQuery()->setBase($this->baseDn); - if ($this->filter) { - $query->getQuery()->setNativeFilter($this->filter); - } - - return $query; - } - /** * Initialize this repository's virtual tables * @@ -335,6 +317,28 @@ class LdapUserBackend extends LdapRepository implements UserBackendInterface, In return ((int) $value) >= $bigBang->diff($now)->days; } + /** + * Validate that the requested table exists + * + * @param string $table The table to validate + * @param RepositoryQuery $query An optional query to pass as context + * + * @return string + * + * @throws ProgrammingError In case the given table does not exist + */ + public function requireTable($table, RepositoryQuery $query = null) + { + if ($query !== null) { + $query->getQuery()->setBase($this->baseDn); + if ($this->filter) { + $query->getQuery()->setNativeFilter($this->filter); + } + } + + return parent::requireTable($table, $query); + } + /** * Validate that the given column is a valid query target and return it or the actual name if it's an alias *