1

I want to get all users with type Students or Professor, for example. The searchUsers(String criteria, int first, int last) method of the UserDirectoryService only matches against 'id or email, first or last name'.

Is there a way I can get a User or List of Users with other criteria?

Thanks,

4

1 回答 1

1

不是现在。如果您提交Jira,那么我们可以实施它。

当然,您可以通过 UserDirectorySergice.getUsers() 获取所有用户,然后遍历每个用户并检查类型,但这可能非常昂贵,具体取决于用户数量和缓存的内容。

该方法也只会获得内部用户。只能通过某些搜索条件找到外部用户。

请记住,外部配置的用户(即 LDAP)在 Sakai 中没有像内部用户那样的固定类型,因为需要查询外部源并运行逻辑来确定类型。

于 2014-08-01T09:45:57.283 回答