LdapUserGroupBackend: Restore method requireTable()

refs #9950
This commit is contained in:
Johannes Meyer 2015-09-25 16:24:16 +02:00
parent fe9ee48d65
commit e5f2174c1e
1 changed files with 23 additions and 0 deletions

View File

@ -419,6 +419,29 @@ class LdapUserGroupBackend extends LdapRepository implements UserGroupBackendInt
);
}
/**
* Validate that the requested table exists
*
* This will return $this->groupClass in case $table equals "group" or "group_membership".
*
* @param string $table The table to validate
* @param RepositoryQuery $query An optional query to pass as context
* (unused by the base implementation)
*
* @return string
*
* @throws ProgrammingError In case the given table does not exist
*/
public function requireTable($table, RepositoryQuery $query = null)
{
$table = parent::requireTable($table, $query);
if ($table === 'group' || $table === 'group_membership') {
$table = $this->groupClass;
}
return $table;
}
/**
* Return the groups the given user is a member of
*