You are here

public function userloginbar::access in UserLoginBar 8

File

lib/Drupal/userloginbar/Plugin/Block/userloginbar.php, line 75
Contains \Drupal\userloginbar\Plugin\Block\userloginbar.

Class

userloginbar
Provides a simple block.

Namespace

Drupal\userloginbar\Plugin\Block

Code

public function access() {
  if (!$GLOBALS['user']
    ->id() && !(arg(0) == 'user' && !is_numeric(arg(1)))) {
    return !$GLOBALS['user']
      ->id() && !(arg(0) == 'user' && !is_numeric(arg(1)));
  }
  else {
    return $GLOBALS['user']
      ->id();
  }
}