original_string: protected static function export_password_resets(int $userid, \context $context) {
          global $DB;
          $records = $DB->get_records('user_password_resets', ['userid' => $userid]);
          if (!empty($records)) {
              $passwordresets = (object) array_map(function($record) {
                  return [
                      'timerequested' => transform::datetime($record->timerequested),
                      'timererequested' => transform::datetime($record->timererequested)
                  ];
              }, $records);
              writer::with_context($context)->export_data([get_string('privacy:passwordresetpath', 'user')], $passwordresets);
          }
      }
code: protected static function export_password_resets(int $userid, \context $context) {
          global $DB;
          $records = $DB->get_records('user_password_resets', ['userid' => $userid]);
          if (!empty($records)) {
              $passwordresets = (object) array_map(function($record) {
                  return [
                      'timerequested' => transform::datetime($record->timerequested),
                      'timererequested' => transform::datetime($record->timererequested)
                  ];
              }, $records);
              writer::with_context($context)->export_data([get_string('privacy:passwordresetpath', 'user')], $passwordresets);
          }
      }
code_tokens: protected static function export_password_resets ( int $ userid , \ context $ context ) { global $ DB ; $ records = $ DB -> get_records ( 'user_password_resets' , [ 'userid' => $ userid ] ) ; if ( ! empty ( $ records ) ) { $ passwordresets = ( object ) array_map ( function ( $ record ) { return [ 'timerequested' => transform :: datetime ( $ record -> timerequested ) , 'timererequested' => transform :: datetime ( $ record -> timererequested ) ] ; } , $ records ) ; writer :: with_context ( $ context ) -> export_data ( [ get_string ( 'privacy:passwordresetpath' , 'user' ) ] , $ passwordresets ) ; } }
docstring: Exports information about password resets.
  
  @param  int $userid The user ID
  @param  \context $context Context for this user.
docstring_tokens: Exports information about password resets .