From bc4e9f628c13a980fb4e8643e2cd4db4e239e697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mudr=C3=A1k?= Date: Wed, 21 Mar 2018 18:04:56 +0100 Subject: [PATCH] MDL-61658 user: Fix parsing of the agedigitalconsentmap setting When parsing and validating the value of the Digital age of consent (agedigitalconsentmap) field, we want to load all country codes. Not just the ones whitelisted for drop down menus that users can choose from. --- auth/classes/digital_consent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth/classes/digital_consent.php b/auth/classes/digital_consent.php index e3e7e59bd61..3f7e3afc36b 100644 --- a/auth/classes/digital_consent.php +++ b/auth/classes/digital_consent.php @@ -71,7 +71,7 @@ class digital_consent { public static function parse_age_digital_consent_map($ageconsentmap) { $ageconsentmapparsed = array(); - $countries = get_string_manager()->get_list_of_countries(); + $countries = get_string_manager()->get_list_of_countries(true); $isdefaultvaluepresent = false; $lines = preg_split('/\r|\n/', $ageconsentmap, -1, PREG_SPLIT_NO_EMPTY); foreach ($lines as $line) {