summaryrefslogtreecommitdiff
path: root/lib/api/users.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/users.rb')
-rw-r--r--lib/api/users.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb
index 01fd90139b0..fd2128bd179 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -303,10 +303,10 @@ module API
if !user
not_found!('User')
- elsif !user.ldap_blocked?
- user.activate
- else
+ elsif user.ldap_blocked?
forbidden!('LDAP blocked users cannot be unblocked by the API')
+ else
+ user.activate
end
end
end