Skip to content

Commit

Permalink
Rubocop nitpicking
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorcorrea authored and jrgriffiniii committed Aug 20, 2024
1 parent d33ac5d commit 18101e3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,12 @@ def self.safe_uid(uid)
end

def self.email_from_access_token(access_token)
if access_token.extra.mail != nil
if !access_token.extra.mail.nil?
# For typical Princeton accounts the email comes on the `email` field
access_token.extra.mail
elsif User.looks_like_email_address?(access_token.extra.givenname)
# For Guest Access Accounts (GAP) the email comes in the `givenname`
access_token.extra.givenname
else
nil
end
end

Expand Down

0 comments on commit 18101e3

Please sign in to comment.