Skip to main content
Drupal 8 Notes
  • Contribute
  • RSS RSS

Current logged in user in Drupal 8

How to get the current logged in user in Drupal 8
1
$user = \Drupal::currentUser();
Tweet
  • « How to check for user access or permission in Drupal 8
  • How to exclude or remove stylesheets added by core or other modules »
Is this post incomplete? Want to help? Add a comment below or click here to contribute.

This site is hosted on Github. Want to help?