npauzenga / Blocitoff

Self-destructing To-Do list app with rake automation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

resetting a password should not automatically log user in

npauzenga opened this issue · comments

  def update
    password_reset = UpdatePassword.call(user_params: user_params, user: @user)

    if password_reset.success?
      log_in(password_reset.user)
      flash[:success] = "Password has been reset"
      redirect_to sign_in_path
    else
      render "edit"
    end
  end