# 必填自己的工作单位,其实就是学校

This commit is contained in:
yanxd 2014-05-11 12:11:36 +08:00
parent 49d6e408b4
commit e6e001246f
1 changed files with 2 additions and 1 deletions

View File

@ -737,8 +737,9 @@ class UsersController < ApplicationController
User.current.admin? ? 'base_admin' : default_base
end
# 必填自己的工作单位,其实就是学校
def auth_user_extension
if @user.user_extensions.school.nil?
if @user == User.current && @user.user_extensions.school.nil?
flash[:error] = l(:error_complete_occupation)
redirect_to my_account_path
end