original_string: protected static function get_records($userid) {
          global $DB;
  
          $sql = "SELECT *
                    FROM {user_info_data} uda
                    JOIN {user_info_field} uif ON uda.fieldid = uif.id
                   WHERE uda.userid = :userid
                         AND uif.datatype = :datatype";
          $params = [
              'userid' => $userid,
              'datatype' => 'checkbox'
          ];
  
          return $DB->get_records_sql($sql, $params);
      }
code: protected static function get_records($userid) {
          global $DB;
  
          $sql = "SELECT *
                    FROM {user_info_data} uda
                    JOIN {user_info_field} uif ON uda.fieldid = uif.id
                   WHERE uda.userid = :userid
                         AND uif.datatype = :datatype";
          $params = [
              'userid' => $userid,
              'datatype' => 'checkbox'
          ];
  
          return $DB->get_records_sql($sql, $params);
      }
code_tokens: protected static function get_records ( $ userid ) { global $ DB ; $ sql = "SELECT *
                    FROM {user_info_data} uda
                    JOIN {user_info_field} uif ON uda.fieldid = uif.id
                   WHERE uda.userid = :userid
                         AND uif.datatype = :datatype" ; $ params = [ 'userid' => $ userid , 'datatype' => 'checkbox' ] ; return $ DB -> get_records_sql ( $ sql , $ params ) ; }
docstring: Get records related to this plugin and user.
  
  @param  int $userid The user ID
  @return array An array of records.
docstring_tokens: Get records related to this plugin and user .