|
|
@ -544,15 +544,6 @@ class User < ApplicationRecord
|
|
|
|
Educoder::Utils.random_hex(16)
|
|
|
|
Educoder::Utils.random_hex(16)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
# 基本资料是否完善
|
|
|
|
|
|
|
|
def base_info_completed?
|
|
|
|
|
|
|
|
user_columns = %i[nickname lastname]
|
|
|
|
|
|
|
|
user_extension_columns = %i[gender location location_city identity school_id department]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
user_columns.all? { |column| public_send(column).present? } &&
|
|
|
|
|
|
|
|
user_extension_columns.all? { |column| user_extension.send(column).present? }
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 全部已认证
|
|
|
|
# 全部已认证
|
|
|
|
def all_certified?
|
|
|
|
def all_certified?
|
|
|
|
authentication? && professional_certification?
|
|
|
|
authentication? && professional_certification?
|
|
|
|