newleaders/thincloud-authentication

View on GitHub
app/services/thincloud/authentication/password_reset_workflow.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Thincloud::Authentication
  # Public: Execute the workflow steps to reset a password for an Identity
  class PasswordResetWorkflow
    def self.call(email)
      return unless identity = Identity.find_by_email(email)
      identity.generate_password_reset!
      PasswordsMailer.password_reset(identity.id).deliver
    end
  end
end