saml.rb 370 B

123456789101112131415
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Authorization::Provider::Saml < Authorization::Provider
  3. private
  4. def find_user
  5. user = User.find_by(login: uid)
  6. if !user && !Setting.get('user_email_multiple_use') && info['email'].present?
  7. user = User.find_by(email: info['email'].downcase)
  8. end
  9. user
  10. end
  11. end