Log in
Model

AdminSessionUserContext

Magento\User\Model\Authorization\AdminSessionUserContext

What it does

This class provides access to the currently logged-in admin user's information from their backend session.

Developers use this to identify which admin user is making a request, typically for authorization checks, audit logging, or personalized admin experiences.

It implements the UserContextInterface to standardize how admin user identity is retrieved across Magento.

Public Methods

  • getUserId()
  • getUserType()