summaryrefslogtreecommitdiff
path: root/gitlab/objects.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r--gitlab/objects.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py
index 9849179..7a679fc 100644
--- a/gitlab/objects.py
+++ b/gitlab/objects.py
@@ -565,6 +565,14 @@ class User(GitlabObject):
class UserManager(BaseManager):
obj_cls = User
+ def search(self, query, **kwargs):
+ """Search users.
+
+ Returns a list of matching users.
+ """
+ url = self.obj_cls._url + '?search=' + query
+ return self._custom_list(url, self.obj_cls, **kwargs)
+
class CurrentUserKey(GitlabObject):
_url = '/user/keys'