original_string: public static function delete_data_for_userlist(\core_privacy\local\request\approved_userlist $userlist) {
          list($db, $table) = static::get_database_and_table();
          if (!$db || !$table) {
              return;
          }
          list($insql, $inparams) = $db->get_in_or_equal($userlist->get_userids(), SQL_PARAMS_NAMED);
          $params = array_merge($inparams, ['contextid' => $userlist->get_context()->id]);
          $db->delete_records_select($table, "contextid = :contextid AND userid $insql", $params);
      }
code: public static function delete_data_for_userlist(\core_privacy\local\request\approved_userlist $userlist) {
          list($db, $table) = static::get_database_and_table();
          if (!$db || !$table) {
              return;
          }
          list($insql, $inparams) = $db->get_in_or_equal($userlist->get_userids(), SQL_PARAMS_NAMED);
          $params = array_merge($inparams, ['contextid' => $userlist->get_context()->id]);
          $db->delete_records_select($table, "contextid = :contextid AND userid $insql", $params);
      }
code_tokens: public static function delete_data_for_userlist ( \ core_privacy \ local \ request \ approved_userlist $ userlist ) { list ( $ db , $ table ) = static :: get_database_and_table ( ) ; if ( ! $ db || ! $ table ) { return ; } list ( $ insql , $ inparams ) = $ db -> get_in_or_equal ( $ userlist -> get_userids ( ) , SQL_PARAMS_NAMED ) ; $ params = array_merge ( $ inparams , [ 'contextid' => $ userlist -> get_context ( ) -> id ] ) ; $ db -> delete_records_select ( $ table , "contextid = :contextid AND userid $insql" , $ params ) ; }
docstring: Delete all user data for the specified users, in the specified context.
  
  @param \core_privacy\local\request\approved_userlist $contextlist The approved contexts and user information to delete information for.
docstring_tokens: Delete all user data for the specified users in the specified context .