summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/users.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb
index 47a44ba9598..c469751c31c 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -57,7 +57,7 @@ module API
get do
authenticated_as_admin! if params[:external].present? || (params[:extern_uid].present? && params[:provider].present?)
- unless current_user.admin?
+ unless current_user&.admin?
params.except!(:created_after, :created_before)
end