original_string: protected static function export_user_data_blocked_users(int $userid) {
          global $DB;
  
          $context = \context_user::instance($userid);
  
          if ($blockedusers = $DB->get_records('message_users_blocked', ['userid' => $userid], 'id ASC')) {
              $blockedusersdata = [];
              foreach ($blockedusers as $blockeduser) {
                  $blockedusersdata[] = (object) [
                      'blockeduser' => transform::user($blockeduser->blockeduserid)
                  ];
              }
              writer::with_context($context)->export_data([get_string('blockedusers', 'core_message')], (object) $blockedusersdata);
          }
      }
code: protected static function export_user_data_blocked_users(int $userid) {
          global $DB;
  
          $context = \context_user::instance($userid);
  
          if ($blockedusers = $DB->get_records('message_users_blocked', ['userid' => $userid], 'id ASC')) {
              $blockedusersdata = [];
              foreach ($blockedusers as $blockeduser) {
                  $blockedusersdata[] = (object) [
                      'blockeduser' => transform::user($blockeduser->blockeduserid)
                  ];
              }
              writer::with_context($context)->export_data([get_string('blockedusers', 'core_message')], (object) $blockedusersdata);
          }
      }
code_tokens: protected static function export_user_data_blocked_users ( int $ userid ) { global $ DB ; $ context = \ context_user :: instance ( $ userid ) ; if ( $ blockedusers = $ DB -> get_records ( 'message_users_blocked' , [ 'userid' => $ userid ] , 'id ASC' ) ) { $ blockedusersdata = [ ] ; foreach ( $ blockedusers as $ blockeduser ) { $ blockedusersdata [ ] = ( object ) [ 'blockeduser' => transform :: user ( $ blockeduser -> blockeduserid ) ] ; } writer :: with_context ( $ context ) -> export_data ( [ get_string ( 'blockedusers' , 'core_message' ) ] , ( object ) $ blockedusersdata ) ; } }
docstring: Export the messaging blocked users data.
  
  @param int $userid
docstring_tokens: Export the messaging blocked users data .