diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 98b58614..b1eee18d 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -3,7 +3,7 @@ class ManagementsController < ApplicationController before_filter :require_business before_filter :require_admin, :only => [:shixun_setting_list, :mirror_repository, :mirror_picture_shixuns, :editmd_template, :editmd_template, :subject_level_system, :subject_setting_list, - :shixun_authorization, :ec_template, :codemirror_template, + :shixun_authorization, :ec_template, :codemirror_template, :update_user, :course_guide_template, :shixun_quality_score, :tech_system, :update_notice, :setting_banner, :training_2018, :create_standard] layout 'base_management' diff --git a/app/services/sources_service.rb b/app/services/sources_service.rb index aa95d382..e5857b52 100644 --- a/app/services/sources_service.rb +++ b/app/services/sources_service.rb @@ -171,7 +171,8 @@ class SourcesService def get_user_info params user = User.find params[:id] - {username: user.show_real_name, user_id: user.id, email: user.mail, phone: user.phone, sex: user.sex, school_name: user.school_name} + mail = user.mail.presence || "login@educoder.net" + {username: user.show_real_name, user_id: user.id, email: mail, phone: user.phone, sex: user.sex, school_name: user.school_name} end # courses start ############################################