mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
raise not found if user is not found
This commit is contained in:
parent
8f8ea735ee
commit
a901d682fe
1 changed files with 3 additions and 0 deletions
|
@ -330,6 +330,9 @@ class UsersController < ApplicationController
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue