Scoped reset password to provider (#978)

This commit is contained in:
Ahmad Farhat 2020-03-03 14:43:10 -05:00 committed by GitHub
parent 90dff3dc7f
commit 037e4f1c43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ class PasswordResetsController < ApplicationController
def create
begin
# Check if user exists and throw an error if he doesn't
@user = User.find_by!(email: params[:password_reset][:email].downcase)
@user = User.find_by!(email: params[:password_reset][:email].downcase, provider: @user_domain)
@user.create_reset_digest
send_password_reset_email(@user)