Merge branch 'develop' of 10.0.47.245:/home/trustie2 into develop

This commit is contained in:
Wen 2014-04-02 20:32:50 +08:00
commit 6986616783
2 changed files with 5 additions and 0 deletions

View File

@ -37,6 +37,9 @@ class AccountController < ApplicationController
end
# Log out current user and redirect to welcome page
# cookies[:login_flag] 是为了配合毛xx
# 退出再登录的话直接跳转到用户首页而不是登陆前的页面
# 相应处理方法在application_helper#is_logout? :1106
def logout
if User.current.anonymous?
redirect_to home_url

View File

@ -1103,6 +1103,8 @@ module ApplicationHelper
url
end
# 完成毛 功能
# 具体信息参考account_controller#logout
def is_logout?
ret = cookies[:login_flag] == 1 ? true : false
cookies.delete(:login_flag)