基本资料中从业者的身份判断

This commit is contained in:
cxt 2016-08-26 18:34:35 +08:00
parent f25a90cccd
commit ff95567926
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class AccountController < ApplicationController
user = UserExtensions.where(:user_id => User.current.id).first
if user.gender.nil? || user.school_id.nil? || User.current.lastname.nil?
redirect_to my_account_path(:tip => 1)
elsif user.identity == 3 && user.occupation.nil?
elsif user.identity == 3 && user.school_id.nil?
redirect_to my_account_path(:tip => 1)
else
redirect_to user_path(User.current)
@ -359,7 +359,7 @@ class AccountController < ApplicationController
user = UserExtensions.where(:user_id => User.current.id).first
if user.gender.nil? || user.school_id.nil? || User.current.lastname.nil?
redirect_to my_account_path(:tip => 1)
elsif user.identity == 3 && user.occupation.nil?
elsif user.identity == 3 && user.school_id.nil?
redirect_to my_account_path(:tip => 1)
else
redirect_back_or_default User.current