基本资料中从业者的身份判断
This commit is contained in:
parent
f25a90cccd
commit
ff95567926
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue