Skip to content

Commit

Permalink
Improve logic flow
Browse files Browse the repository at this point in the history
  • Loading branch information
jvlcek committed Nov 15, 2019
1 parent 6d53335 commit e4fa2a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/miq_ldap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ def get_user_object(username, user_type = nil)
user_type ||= @user_type.split("-").first
if dn?(username)
user_type = "dn"
elsif upn?(username)
user_type = "upn" unless user_type == "mail"
elsif user_type != "mail" && upn?(username)
user_type = "upn"
end

begin
Expand Down

0 comments on commit e4fa2a7

Please sign in to comment.