/**
  * Checks if the current user uses the user directory
  * @return boolean
  */
 public function isUserDirectoryEnabled()
 {
     $isAllowed = $this->securityManager->isPermissionAllowed(self::PERMISSION_USERDIR);
     if (!$isAllowed) {
         return false;
     }
     $user = $this->securityManager->getUser();
     // skip anonymous users and super users from the ORM security model
     if (!$user || method_exists($user, 'isSuperUser') && $user->isSuperUser()) {
         return false;
     }
     return true;
 }