public function UserIsLoggedIn::isLoggedIn in Twig Extender 4.x
Same name and namespace in other branches
- 8.4 src/Plugin/TwigPlugin/UserIsLoggedIn.php \Drupal\twig_extender\Plugin\TwigPlugin\UserIsLoggedIn::isLoggedIn()
- 8 src/Plugin/TwigPlugin/UserIsLoggedIn.php \Drupal\twig_extender\Plugin\TwigPlugin\UserIsLoggedIn::isLoggedIn()
- 8.2 src/Plugin/TwigPlugin/UserIsLoggedIn.php \Drupal\twig_extender\Plugin\TwigPlugin\UserIsLoggedIn::isLoggedIn()
- 8.3 src/Plugin/TwigPlugin/UserIsLoggedIn.php \Drupal\twig_extender\Plugin\TwigPlugin\UserIsLoggedIn::isLoggedIn()
Implement user is logged in function.
File
- src/
Plugin/ TwigPlugin/ UserIsLoggedIn.php, line 23
Class
- UserIsLoggedIn
- The plugin for check authenticated user.
Namespace
Drupal\twig_extender\Plugin\TwigPluginCode
public function isLoggedIn() {
return \Drupal::currentUser()
->isAuthenticated();
}