diff options
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 9852736..8700317 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -12,6 +12,12 @@ class ApplicationController < ActionController::Base def current_user @current_user ||= session[:current_user] + + # Backward compatibility. Until 7.13 user session doesn't contain access_token + # Users with old session should be logged out + return nil if @current_user && @current_user.access_token.nil? + + @current_user end def sign_in(user) |