Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
880cb8aa
Commit
880cb8aa
authored
Apr 16, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Paginate users in users api
parent
771b5c22
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
doc/api/users.md
doc/api/users.md
+1
-0
lib/api/users.rb
lib/api/users.rb
+1
-0
No files found.
doc/api/users.md
View file @
880cb8aa
## List users
## List users
Get a list of users.
Get a list of users.
This function takes pagination parameters
`page`
and
`per_page`
to restrict the list of users.
```
```
GET /users
GET /users
...
...
lib/api/users.rb
View file @
880cb8aa
...
@@ -12,6 +12,7 @@ module Gitlab
...
@@ -12,6 +12,7 @@ module Gitlab
@users
=
User
.
scoped
@users
=
User
.
scoped
@users
=
@users
.
active
if
params
[
:active
].
present?
@users
=
@users
.
active
if
params
[
:active
].
present?
@users
=
@users
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
@users
=
@users
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
@users
=
paginate
@users
present
@users
,
with:
Entities
::
User
present
@users
,
with:
Entities
::
User
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment