protected static function export_subscription_data(int $userid, \stdClass $forum, int $subscribed) {
        if (null !== $subscribed) {
            // The user is subscribed to this forum.
            writer::with_context(\context_module::instance($forum->cmid))
                ->export_metadata([], 'subscriptionpreference', 1, get_string('privacy:subscribedtoforum', 'mod_forum'));

            return true;
        }

        return false;
    }
protected static function export_subscription_data(int $userid, \stdClass $forum, int $subscribed) {
        if (null !== $subscribed) {
            // The user is subscribed to this forum.
            writer::with_context(\context_module::instance($forum->cmid))
                ->export_metadata([], 'subscriptionpreference', 1, get_string('privacy:subscribedtoforum', 'mod_forum'));

            return true;
        }

        return false;
    }
protected static function export_subscription_data ( int $ userid , \ stdClass $ forum , int $ subscribed ) { if ( null !== $ subscribed ) { // The user is subscribed to this forum. writer :: with_context ( \ context_module :: instance ( $ forum -> cmid ) ) -> export_metadata ( [ ] , 'subscriptionpreference' , 1 , get_string ( 'privacy:subscribedtoforum' , 'mod_forum' ) ) ; return true ; } return false ; }
Store data about whether the user subscribes to forum.

@param   int         $userid The userid of the user whose data is to be exported.
@param   \stdClass   $forum The forum whose data is being exported.
@param   int         $subscribed if the user is subscribed
@return  bool        Whether any data was stored.
Store data about whether the user subscribes to forum .