Module: OmniauthableHelper

Included in:
OmniauthableController
Defined in:
lib/recsolu_login_client/omniauthable_helper.rb

Instance Method Summary collapse

Instance Method Details

#current_userObject



2
3
4
5
# File 'lib/recsolu_login_client/omniauthable_helper.rb', line 2

def current_user
  return nil unless session[:user_id]
  @current_user ||= User.find_by_uid(session[:user_id]['uid'])
end

#user_signed_in?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/recsolu_login_client/omniauthable_helper.rb', line 7

def user_signed_in?
  current_user.present?
end