From 1d1216e61f44b6c22a4bd29ed2e30f4a323a40bb Mon Sep 17 00:00:00 2001 From: Brandon Date: Sun, 27 Oct 2024 08:05:50 -0400 Subject: [PATCH] chore: fixed refactor errors --- app/controllers/impersonate_controller.rb | 2 +- app/controllers/invitations_controller.rb | 2 +- app/helpers/conference_helper.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/impersonate_controller.rb b/app/controllers/impersonate_controller.rb index 2d1c7416714..8dd3d5505f4 100644 --- a/app/controllers/impersonate_controller.rb +++ b/app/controllers/impersonate_controller.rb @@ -145,7 +145,7 @@ def impersonate def real_user(username) if User.anonymized_view?(session[:ip]) - user = User.real_user_from_anonymized_name(username) + user = User.real_user_from_anonymized_username(username) else user = User.find_by(username: username) end diff --git a/app/controllers/invitations_controller.rb b/app/controllers/invitations_controller.rb index 974f6c31c7d..d508f77059b 100644 --- a/app/controllers/invitations_controller.rb +++ b/app/controllers/invitations_controller.rb @@ -81,7 +81,7 @@ def create_utility prepared_mail = MailerHelper.send_mail_to_user(@user, 'Invitation Received on Expertiza', 'invite_participant_to_team', '') prepared_mail.deliver end - ExpertizaLogger.info LoggerMessage.new(controller_name, @student.username, "Successfully invited student #{@user.id}", request) + ExpertizaLogger.info LoggerMessage.new(controller_name, @student.name, "Successfully invited student #{@user.id}", request) end def check_user_before_invitation diff --git a/app/helpers/conference_helper.rb b/app/helpers/conference_helper.rb index 2e974c6cd5c..36673b97d08 100644 --- a/app/helpers/conference_helper.rb +++ b/app/helpers/conference_helper.rb @@ -36,7 +36,7 @@ def get_redirect_url_link end def create_author - params[:user][:name] = params[:user][:email] unless !params[:user][:name].nil? && !params[:user][:name].empty? + params[:user][:username] = params[:user][:email] unless !params[:user][:name].nil? && !params[:user][:name].empty? is_author = true # Assign all user params for creating author using assign_user_params function @user = assign_user_params(is_author)