original_string: public static function hasTheUserSuperUserAccess($theUser)
      {
          if (empty($theUser)) {
              return false;
          }
  
          if (Piwik::getCurrentUserLogin() === $theUser && Piwik::hasUserSuperUserAccess()) {
              return true;
          }
  
          try {
              $superUsers = APIUsersManager::getInstance()->getUsersHavingSuperUserAccess();
          } catch (\Exception $e) {
              return false;
          }
  
          foreach ($superUsers as $superUser) {
              if ($theUser === $superUser['login']) {
                  return true;
              }
          }
  
          return false;
      }
code: public static function hasTheUserSuperUserAccess($theUser)
      {
          if (empty($theUser)) {
              return false;
          }
  
          if (Piwik::getCurrentUserLogin() === $theUser && Piwik::hasUserSuperUserAccess()) {
              return true;
          }
  
          try {
              $superUsers = APIUsersManager::getInstance()->getUsersHavingSuperUserAccess();
          } catch (\Exception $e) {
              return false;
          }
  
          foreach ($superUsers as $superUser) {
              if ($theUser === $superUser['login']) {
                  return true;
              }
          }
  
          return false;
      }
code_tokens: public static function hasTheUserSuperUserAccess ( $ theUser ) { if ( empty ( $ theUser ) ) { return false ; } if ( Piwik :: getCurrentUserLogin ( ) === $ theUser && Piwik :: hasUserSuperUserAccess ( ) ) { return true ; } try { $ superUsers = APIUsersManager :: getInstance ( ) -> getUsersHavingSuperUserAccess ( ) ; } catch ( \ Exception $ e ) { return false ; } foreach ( $ superUsers as $ superUser ) { if ( $ theUser === $ superUser [ 'login' ] ) { return true ; } } return false ; }
docstring: Check whether the given user has superuser access.
  
  @param string $theUser A username.
  @return bool
  @api
docstring_tokens: Check whether the given user has superuser access .