function TrackerController::checkAccess
Same name in other branches
- 9 core/modules/tracker/src/Controller/TrackerController.php \Drupal\tracker\Controller\TrackerController::checkAccess()
- 10 core/modules/tracker/src/Controller/TrackerController.php \Drupal\tracker\Controller\TrackerController::checkAccess()
- 11.x core/modules/tracker/src/Controller/TrackerController.php \Drupal\tracker\Controller\TrackerController::checkAccess()
Checks access for the users recent content tracker page.
Parameters
\Drupal\user\UserInterface $user: The user being viewed.
\Drupal\Core\Session\AccountInterface $account: The account viewing the page.
Return value
\Drupal\Core\Access\AccessResult The access result.
1 string reference to 'TrackerController::checkAccess'
- tracker.routing.yml in core/
modules/ tracker/ tracker.routing.yml - core/modules/tracker/tracker.routing.yml
File
-
core/
modules/ tracker/ src/ Controller/ TrackerController.php, line 117
Class
- TrackerController
- Controller for tracker pages.
Namespace
Drupal\tracker\ControllerCode
public function checkAccess(UserInterface $user, AccountInterface $account) {
return AccessResult::allowedIf($account->isAuthenticated() && $user->id() == $account->id())
->cachePerUser();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.