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();
    }
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();
    }
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 ( ) ; }
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
Delete an identity issuer .