Merge branch 'dev_toschina' of https://git.trustie.net/jacknudt/trustieforge into dev_toschina

This commit is contained in:
daiao 2018-11-22 23:57:45 -08:00
commit 5caa9bc61a
1 changed files with 10 additions and 1 deletions

View File

@ -45,7 +45,16 @@ class OschinaController < ApplicationController
end
self.logged_user = oschina.user
redirect_to my_account_url
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.school_id.nil?
redirect_to my_account_path(:tip => 1)
else
redirect_to User.current
end
end