forked from External/greenlight
GRN-88: Fixed some things that Scrutinizer was complaining about (#433)
* Scrutinizer fixes * Moved helper code to concern * Another scrutinizer fix * User controller conflict fix * Another user controller fix * Added include verifier
This commit is contained in:
committed by
Jesus Federico
parent
5e3aa72955
commit
88776eaadb
@ -17,6 +17,8 @@
|
||||
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
class AccountActivationsController < ApplicationController
|
||||
include Verifier
|
||||
|
||||
before_action :ensure_unauthenticated
|
||||
before_action :find_user
|
||||
|
||||
@ -44,7 +46,7 @@ class AccountActivationsController < ApplicationController
|
||||
flash[:alert] = I18n.t("verify.already_verified")
|
||||
else
|
||||
begin
|
||||
@user.send_activation_email(verification_link)
|
||||
@user.send_activation_email(user_verification_link)
|
||||
rescue => e
|
||||
logger.error "Error in email delivery: #{e}"
|
||||
flash[:alert] = I18n.t(params[:message], default: I18n.t("delivery_error"))
|
||||
@ -58,10 +60,6 @@ class AccountActivationsController < ApplicationController
|
||||
|
||||
private
|
||||
|
||||
def verification_link
|
||||
request.base_url + edit_account_activation_path(token: @user.activation_token, email: @user.email)
|
||||
end
|
||||
|
||||
def ensure_unauthenticated
|
||||
redirect_to current_user.main_room if current_user
|
||||
end
|
||||
|
Reference in New Issue
Block a user