original_string: public static function delete_issuer($id) {
          require_capability('moodle/site:config', context_system::instance());
          $issuer = new issuer($id);
  
          $systemaccount = self::get_system_account($issuer);
          if ($systemaccount) {
              $systemaccount->delete();
          }
          $endpoints = self::get_endpoints($issuer);
          if ($endpoints) {
              foreach ($endpoints as $endpoint) {
                  $endpoint->delete();
              }
          }
  
          // Will throw exceptions on validation failures.
          return $issuer->delete();
      }
code: public static function delete_issuer($id) {
          require_capability('moodle/site:config', context_system::instance());
          $issuer = new issuer($id);
  
          $systemaccount = self::get_system_account($issuer);
          if ($systemaccount) {
              $systemaccount->delete();
          }
          $endpoints = self::get_endpoints($issuer);
          if ($endpoints) {
              foreach ($endpoints as $endpoint) {
                  $endpoint->delete();
              }
          }
  
          // Will throw exceptions on validation failures.
          return $issuer->delete();
      }
code_tokens: public static function delete_issuer ( $ id ) { require_capability ( 'moodle/site:config' , context_system :: instance ( ) ) ; $ issuer = new issuer ( $ id ) ; $ systemaccount = self :: get_system_account ( $ issuer ) ; if ( $ systemaccount ) { $ systemaccount -> delete ( ) ; } $ endpoints = self :: get_endpoints ( $ issuer ) ; if ( $ endpoints ) { foreach ( $ endpoints as $ endpoint ) { $ endpoint -> delete ( ) ; } } // Will throw exceptions on validation failures. return $ issuer -> delete ( ) ; }
docstring: Delete an identity issuer.
  
  Requires moodle/site:config capability at the system context.
  
  @param int $id The id of the identity issuer to delete.
  @return boolean
docstring_tokens: Delete an identity issuer .