original_string: public function filterLogins($logins)
      {
          if ($this->access->hasSuperUserAccess()) {
              return $logins;
          }
  
          if (!$this->access->isUserHasSomeAdminAccess()) {
              // keep only own user if it is in the list
              foreach ($logins as $login) {
                  if ($this->isOwnLogin($login)) {
                      return array($login);
                  }
              }
  
              return array();
          }
  
          foreach ($logins as $index => $login) {
              if (!$this->isNonSuperUserAllowedToSeeThisLogin($login)) {
                  unset($logins[$index]);
              }
          }
  
          return array_values($logins);
      }
code: public function filterLogins($logins)
      {
          if ($this->access->hasSuperUserAccess()) {
              return $logins;
          }
  
          if (!$this->access->isUserHasSomeAdminAccess()) {
              // keep only own user if it is in the list
              foreach ($logins as $login) {
                  if ($this->isOwnLogin($login)) {
                      return array($login);
                  }
              }
  
              return array();
          }
  
          foreach ($logins as $index => $login) {
              if (!$this->isNonSuperUserAllowedToSeeThisLogin($login)) {
                  unset($logins[$index]);
              }
          }
  
          return array_values($logins);
      }
code_tokens: public function filterLogins ( $ logins ) { if ( $ this -> access -> hasSuperUserAccess ( ) ) { return $ logins ; } if ( ! $ this -> access -> isUserHasSomeAdminAccess ( ) ) { // keep only own user if it is in the list foreach ( $ logins as $ login ) { if ( $ this -> isOwnLogin ( $ login ) ) { return array ( $ login ) ; } } return array ( ) ; } foreach ( $ logins as $ index => $ login ) { if ( ! $ this -> isNonSuperUserAllowedToSeeThisLogin ( $ login ) ) { unset ( $ logins [ $ index ] ) ; } } return array_values ( $ logins ) ; }
docstring: Removes all logins from the list of logins where the current user has no permission to see them.
  
  @param string[] $logins An array of logins / usernames. Eg array('username1', 'username2')
  @return array
docstring_tokens: Removes all logins from the list of logins where the current user has no permission to see them .