MDL-60572 admin: Fix forgottenpasswordurl for WS

We should expect URLs in that field.
The tool_mobile change is to not break the WS response if
forgottenpasswordurl does not contain a URL.
This commit is contained in:
Juan Leyva
2017-10-27 10:41:28 +02:00
parent bcca46d630
commit c12bfcefdd
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -128,7 +128,7 @@ class api {
'rememberusername' => $CFG->rememberusername,
'authloginviaemail' => $CFG->authloginviaemail,
'registerauth' => $CFG->registerauth,
'forgottenpasswordurl' => $CFG->forgottenpasswordurl,
'forgottenpasswordurl' => clean_param($CFG->forgottenpasswordurl, PARAM_URL), // We may expect a mailto: here.
'authinstructions' => $authinstructions,
'authnoneenabled' => (int) is_enabled_auth('none'),
'enablewebservices' => $CFG->enablewebservices,