AccessDeniedSubscriber

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.

Hierarchy

File

core/modules/user/src/EventSubscriber/AccessDeniedSubscriber.php, line 22

Namespace

Drupal\user\EventSubscriber

Members

Name Modifiers Type Description
AccessDeniedSubscriber::$account protected property The current user.
AccessDeniedSubscriber::getSubscribedEvents public static function Returns an array of event names this subscriber wants to listen to. Overrides EventSubscriberInterface::getSubscribedEvents
AccessDeniedSubscriber::onException public function Redirects users when access is denied.
AccessDeniedSubscriber::__construct public function Constructs a new redirect subscriber.
UrlGeneratorTrait::$urlGenerator protected property The url generator.
UrlGeneratorTrait::getUrlGenerator protected function Returns the URL generator service.
UrlGeneratorTrait::redirect protected function Returns a redirect response object for the specified route.
UrlGeneratorTrait::setUrlGenerator public function Sets the URL generator service.
UrlGeneratorTrait::url Deprecated protected function Generates a URL or path for a specific route based on the given parameters.
doc_Drupal
2016-10-29 08:42:23
Comments
Leave a Comment

Please login to continue.