2.7.4 (Build: 20150112)
I am trying to create a user via MOODLE web services. This works fine when I send through simple usernames - however when I send a mixed case one such as John.Bennatt@northbrook.gov.uk is fails.
I have set MOODLE to accept complex passwords but still this fails returning this message.
invalid_parameter_exception","errorcode":"invalidparameter","message":"Invalid parameter value detected","debuginfo":"users => Invalid parameter value detected: username => Invalid parameter value detected: Invalid external api parameter: . . . . the server was expecting \\"username\\" type"
I looked in the code and see that in lib/moodlelib.php the validate_param function calls clean_param() - in this (see snippet below) the username is converted to lower case.
$param = core_text::strtolower($param);
This means that validation fails when the cleaned param (the username) is returned to the validate_params function (code below) as they no longer match.
else if ((string)$param !== (string)$cleaned) {
Sorry if this is in the wrong forum, but am I missing something here as it seems like it will never pass?