Skip to content

Commit

Permalink
Update Devise comment
Browse files Browse the repository at this point in the history
  • Loading branch information
monfresh committed Mar 27, 2017
1 parent cdf1da9 commit 03a4683
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,16 @@ def strip_whitespace
# no-op
end

# Override Devise because we want to include the SAML request id in the
# confirmation instructions email
# In order to pass in the SP request_id to the confirmation instructions
# email, we need to define `send_custom_confirmation_instructions` because
# Devise's `send_confirmation_instructions` does not include arguments.
# We also need to override the Devise method to do nothing because this method
# is called automatically when a user is created due to a Devise callback.
# If we didn't disable it, the user would receive two confirmation emails.
def send_confirmation_instructions
# no-op
end

# This is basically Devise's send_confirmation_instructions method copied
# word for word, except that it adds the ability to pass in the request_id
# to the mailer.
def send_custom_confirmation_instructions(id = nil)
generate_confirmation_token! unless @raw_confirmation_token

Expand Down

0 comments on commit 03a4683

Please sign in to comment.