MDL-57361 auth_email: Force policy agreed on sign-up

This commit is contained in:
Juan Leyva
2017-03-01 18:20:59 +01:00
parent d0209e611f
commit af2d6085cd
+4
View File
@@ -286,6 +286,10 @@ class auth_email_external extends external_api {
// Validate the data sent.
$data = $params;
$data['email2'] = $data['email'];
// Force policy agreed if a site policy is set. The client is responsible of implementing the interface check.
if (!empty($CFG->sitepolicy)) {
$data['policyagreed'] = 1;
}
unset($data['recaptcharesponse']);
unset($data['customprofilefields']);
// Add profile fields data.