AccessDeniedSubscriber
class AccessDeniedSubscriber implements EventSubscriberInterface (View source)
Redirects users when access is denied.
Anonymous users are taken to the login page when attempting to access the user profile pages. Authenticated users are redirected from the login form to their profile page and from the user registration form to their profile edit form.
Properties
| protected AccountInterface | $account | The current user. |
Methods
onException(ExceptionEvent $event)
Redirects users when access is denied.
static
getSubscribedEvents()
{@inheritdoc}
Details
__construct(AccountInterface $account)
Constructs a new redirect subscriber.
onException(ExceptionEvent $event)
Redirects users when access is denied.
static
getSubscribedEvents()
{@inheritdoc}