From abdb8f59a526f511d63df7c437092f015c8d50fe Mon Sep 17 00:00:00 2001 From: Juan Leyva Date: Wed, 6 Sep 2017 13:01:37 +0200 Subject: [PATCH] MDL-59876 webservice: Fix the user preference name field type Web Services from user and enrol components has been updated to change the user preference name field type from PARAM_ALPHANUMEXT to PARAM_RAW. The old type was not matching the core functionality. --- enrol/externallib.php | 4 ++-- user/externallib.php | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/enrol/externallib.php b/enrol/externallib.php index 670be50703f..aacbce6b11d 100644 --- a/enrol/externallib.php +++ b/enrol/externallib.php @@ -252,7 +252,7 @@ class core_enrol_external extends external_api { 'preferences' => new external_multiple_structure( new external_single_structure( array( - 'name' => new external_value(PARAM_ALPHANUMEXT, 'The name of the preferences'), + 'name' => new external_value(PARAM_RAW, 'The name of the preferences'), 'value' => new external_value(PARAM_RAW, 'The value of the custom field'), ) ), 'User preferences', VALUE_OPTIONAL), @@ -725,7 +725,7 @@ class core_enrol_external extends external_api { 'preferences' => new external_multiple_structure( new external_single_structure( array( - 'name' => new external_value(PARAM_ALPHANUMEXT, 'The name of the preferences'), + 'name' => new external_value(PARAM_RAW, 'The name of the preferences'), 'value' => new external_value(PARAM_RAW, 'The value of the custom field'), ) ), 'User preferences', VALUE_OPTIONAL), diff --git a/user/externallib.php b/user/externallib.php index ce0b580fcf6..b203c29c13c 100644 --- a/user/externallib.php +++ b/user/externallib.php @@ -103,7 +103,7 @@ class core_user_external extends external_api { 'preferences' => new external_multiple_structure( new external_single_structure( array( - 'type' => new external_value(PARAM_ALPHANUMEXT, 'The name of the preference'), + 'type' => new external_value(PARAM_RAW, 'The name of the preference'), 'value' => new external_value(PARAM_RAW, 'The value of the preference') ) ), 'User preferences', VALUE_OPTIONAL), @@ -341,7 +341,7 @@ class core_user_external extends external_api { 'preferences' => new external_multiple_structure( new external_single_structure( array( - 'type' => new external_value(PARAM_ALPHANUMEXT, 'The name of the preference'), + 'type' => new external_value(PARAM_RAW, 'The name of the preference'), 'value' => new external_value(PARAM_RAW, 'The value of the preference') ) ), 'User preferences', VALUE_DEFAULT, array() @@ -496,7 +496,7 @@ class core_user_external extends external_api { 'preferences' => new external_multiple_structure( new external_single_structure( array( - 'type' => new external_value(PARAM_ALPHANUMEXT, 'The name of the preference'), + 'type' => new external_value(PARAM_RAW, 'The name of the preference'), 'value' => new external_value(PARAM_RAW, 'The value of the preference') ) ), 'User preferences', VALUE_OPTIONAL), @@ -1069,8 +1069,8 @@ class core_user_external extends external_api { 'preferences' => new external_multiple_structure( new external_single_structure( array( - 'name' => new external_value(PARAM_ALPHANUMEXT, 'The name of the preferences'), - 'value' => new external_value(PARAM_RAW, 'The value of the custom field'), + 'name' => new external_value(PARAM_RAW, 'The name of the preferences'), + 'value' => new external_value(PARAM_RAW, 'The value of the preference'), ) ), 'Users preferences', VALUE_OPTIONAL) );