original_string: protected static function export_password_history(int $userid, \context $context) {
          global $DB;
  
          // Just provide a count of how many entries we have.
          $recordcount = $DB->count_records('user_password_history', ['userid' => $userid]);
          if ($recordcount) {
              $passwordhistory = (object) ['password_history_count' => $recordcount];
              writer::with_context($context)->export_data([get_string('privacy:passwordhistorypath', 'user')], $passwordhistory);
          }
      }
code: protected static function export_password_history(int $userid, \context $context) {
          global $DB;
  
          // Just provide a count of how many entries we have.
          $recordcount = $DB->count_records('user_password_history', ['userid' => $userid]);
          if ($recordcount) {
              $passwordhistory = (object) ['password_history_count' => $recordcount];
              writer::with_context($context)->export_data([get_string('privacy:passwordhistorypath', 'user')], $passwordhistory);
          }
      }
code_tokens: protected static function export_password_history ( int $ userid , \ context $ context ) { global $ DB ; // Just provide a count of how many entries we have. $ recordcount = $ DB -> count_records ( 'user_password_history' , [ 'userid' => $ userid ] ) ; if ( $ recordcount ) { $ passwordhistory = ( object ) [ 'password_history_count' => $ recordcount ] ; writer :: with_context ( $ context ) -> export_data ( [ get_string ( 'privacy:passwordhistorypath' , 'user' ) ] , $ passwordhistory ) ; } }
docstring: Get details about the user's password history.
  
  @param int $userid The user ID that we are getting the password history for.
  @param \context $context the user context.
docstring_tokens: Get details about the user s password history .