mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-14 05:41:00 +00:00
Fix a bug when user was deleted
This commit is contained in:
parent
bfe19eb5e9
commit
1abc42851a
1 changed files with 6 additions and 1 deletions
|
@ -13,7 +13,12 @@ class ApplicationController < ActionController::Base
|
||||||
respond_to :html, :js
|
respond_to :html, :js
|
||||||
|
|
||||||
def cuser
|
def cuser
|
||||||
@cuser ||= User.find(session[:user]) if session[:user]
|
begin
|
||||||
|
@cuser ||= User.find(session[:user])
|
||||||
|
rescue
|
||||||
|
session[:user] = nil
|
||||||
|
@cuser = nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def return_here
|
def return_here
|
||||||
|
|
Loading…
Reference in a new issue