|
|
@ -81,8 +81,6 @@ class AccountsController < ApplicationController
|
|
|
|
return normal_status(-2, "错误的账号或密码")
|
|
|
|
return normal_status(-2, "错误的账号或密码")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
@user.update_column(:last_login_on, Time.now)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
successful_authentication(@user)
|
|
|
|
successful_authentication(@user)
|
|
|
|
|
|
|
|
|
|
|
|
session[:user_id] = @user.id
|
|
|
|
session[:user_id] = @user.id
|
|
|
@ -124,7 +122,7 @@ class AccountsController < ApplicationController
|
|
|
|
|
|
|
|
|
|
|
|
set_autologin_cookie(user)
|
|
|
|
set_autologin_cookie(user)
|
|
|
|
UserAction.create(:action_id => user.try(:id), :action_type => "Login", :user_id => user.try(:id), :ip => request.remote_ip)
|
|
|
|
UserAction.create(:action_id => user.try(:id), :action_type => "Login", :user_id => user.try(:id), :ip => request.remote_ip)
|
|
|
|
|
|
|
|
user.update_column(:last_login_on, Time.now)
|
|
|
|
# 注册完成后有一天的试用申请(先去掉)
|
|
|
|
# 注册完成后有一天的试用申请(先去掉)
|
|
|
|
# UserDayCertification.create(user_id: user.id, status: 1)
|
|
|
|
# UserDayCertification.create(user_id: user.id, status: 1)
|
|
|
|
end
|
|
|
|
end
|
|
|
|