Skip to content

Commit

Permalink
cut domain from user_name
Browse files Browse the repository at this point in the history
cut domain before \ from username
  • Loading branch information
awersate authored Jun 8, 2022
1 parent b137df8 commit 5a420fd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/authenticator/httpd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def username_to_upn_name(user_attrs)
return user_attrs[:username] if user_attrs[:domain].nil?

user_name = user_attrs[:username].split("@").first
user_name = user_name.split("\\").last if user_name.include?("\\")
"#{user_name}@#{user_attrs[:domain]}".downcase
end

Expand Down

0 comments on commit 5a420fd

Please sign in to comment.