Method: Securial::Identity#current_user

Defined in:
app/controllers/concerns/securial/identity.rb

#current_userSecurial::User?

Returns the currently authenticated user or nil if no user is authenticated.

This method provides access to the current user object from the session tracked in Current.session.

Returns:



66
67
68
# File 'app/controllers/concerns/securial/identity.rb', line 66

def current_user
  Current.session&.user
end