pre_develop
daiao 6 years ago
parent ba6df7b9b1
commit 99511fe5e6

@ -319,7 +319,6 @@ class ApplicationController < ActionController::Base
end end
# Token.delete_all(["user_id = ? AND action = ?", User.current.id, 'autologin']) # Token.delete_all(["user_id = ? AND action = ?", User.current.id, 'autologin'])
self.logged_user = nil self.logged_user = nil
session[:third_party_user_id] = nil
end end
end end

@ -116,6 +116,7 @@ class CnmoocsService
def source_url(params) def source_url(params)
user = User.find_by_id(params[:userId]) user = User.find_by_id(params[:userId])
return {error: -1, messages: "用户不存在,请先创建用户"} unless user
token = Token.get_or_create_permanent_login_token(user) token = Token.get_or_create_permanent_login_token(user)
shixun = Shixun.find_by_id(params[:resouceId]) shixun = Shixun.find_by_id(params[:resouceId])
if shixun.blank? if shixun.blank?

Loading…
Cancel
Save