Skip to content

Commit

Permalink
raise not found if user is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
SamSaffron committed Sep 25, 2014
1 parent 8f8ea73 commit a901d68
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ def send_activation_email
RateLimiter.new(nil, "activate-min-#{request.remote_ip}", 6, 1.minute).performed!

@user = User.find_by_username_or_email(params[:username].to_s)

raise Discourse::NotFound unless @user

@email_token = @user.email_tokens.unconfirmed.active.first
enqueue_activation_email if @user
render nothing: true
Expand Down

0 comments on commit a901d68

Please sign in to comment.