Class: Thincloud::Authentication::PasswordResetWorkflow

Inherits:
Object
  • Object
show all
Defined in:
app/services/thincloud/authentication/password_reset_workflow.rb

Overview

Public: Execute the workflow steps to reset a password for an Identity

Class Method Summary collapse

Class Method Details

.call(email) ⇒ Object



4
5
6
7
8
# File 'app/services/thincloud/authentication/password_reset_workflow.rb', line 4

def self.call(email)
  return unless identity = Identity.find_by_email(email)
  identity.generate_password_reset!
  PasswordsMailer.password_reset(identity.id).deliver
end