Commit f6b0de13 authored by Simey Lameze's avatar Simey Lameze Committed by Andrew Nicols
Browse files

MDL-53913 core_user: make parameters consistent across versions

parent 20e9dac8
...@@ -431,7 +431,7 @@ class auth_db_testcase extends advanced_testcase { ...@@ -431,7 +431,7 @@ class auth_db_testcase extends advanced_testcase {
$user3->username = 'john%#&~%*_doe'; $user3->username = 'john%#&~%*_doe';
$user3->email = ' john@testing.com '; $user3->email = ' john@testing.com ';
$user3->deleted = 'no'; $user3->deleted = 'no';
$user3->description = '<b>A description <script>alert(123)</script>about myself.</b>'; $user3->description = '<b>A description about myself.</b>';
$user3cleaned = $auth->clean_data($user3); $user3cleaned = $auth->clean_data($user3);
// Expected results. // Expected results.
......
...@@ -257,15 +257,15 @@ class core_user { ...@@ -257,15 +257,15 @@ class core_user {
// Every new field on the user table should be added here otherwise it won't be validated. // Every new field on the user table should be added here otherwise it won't be validated.
$fields = array(); $fields = array();
$fields['id'] = array('type' => PARAM_INT); $fields['id'] = array('type' => PARAM_INT);
$fields['auth'] = array('type' => PARAM_NOTAGS); $fields['auth'] = array('type' => PARAM_AUTH);
$fields['confirmed'] = array('type' => PARAM_BOOL); $fields['confirmed'] = array('type' => PARAM_BOOL);
$fields['policyagreed'] = array('type' => PARAM_BOOL); $fields['policyagreed'] = array('type' => PARAM_BOOL);
$fields['deleted'] = array('type' => PARAM_BOOL); $fields['deleted'] = array('type' => PARAM_BOOL);
$fields['suspended'] = array('type' => PARAM_BOOL); $fields['suspended'] = array('type' => PARAM_BOOL);
$fields['mnethostid'] = array('type' => PARAM_BOOL); $fields['mnethostid'] = array('type' => PARAM_INT);
$fields['username'] = array('type' => PARAM_USERNAME); $fields['username'] = array('type' => PARAM_USERNAME);
$fields['password'] = array('type' => PARAM_NOTAGS); $fields['password'] = array('type' => PARAM_RAW);
$fields['idnumber'] = array('type' => PARAM_NOTAGS); $fields['idnumber'] = array('type' => PARAM_RAW);
$fields['firstname'] = array('type' => PARAM_NOTAGS); $fields['firstname'] = array('type' => PARAM_NOTAGS);
$fields['lastname'] = array('type' => PARAM_NOTAGS); $fields['lastname'] = array('type' => PARAM_NOTAGS);
$fields['surname'] = array('type' => PARAM_NOTAGS); $fields['surname'] = array('type' => PARAM_NOTAGS);
...@@ -282,20 +282,20 @@ class core_user { ...@@ -282,20 +282,20 @@ class core_user {
$fields['department'] = array('type' => PARAM_TEXT); $fields['department'] = array('type' => PARAM_TEXT);
$fields['address'] = array('type' => PARAM_TEXT); $fields['address'] = array('type' => PARAM_TEXT);
$fields['city'] = array('type' => PARAM_TEXT); $fields['city'] = array('type' => PARAM_TEXT);
$fields['country'] = array('type' => PARAM_TEXT); $fields['country'] = array('type' => PARAM_ALPHA);
$fields['lang'] = array('type' => PARAM_TEXT); $fields['lang'] = array('type' => PARAM_LANG);
$fields['calendartype'] = array('type' => PARAM_NOTAGS); $fields['calendartype'] = array('type' => PARAM_NOTAGS);
$fields['theme'] = array('type' => PARAM_NOTAGS); $fields['theme'] = array('type' => PARAM_THEME);
$fields['timezones'] = array('type' => PARAM_TEXT); $fields['timezone'] = array('type' => PARAM_TIMEZONE);
$fields['firstaccess'] = array('type' => PARAM_INT); $fields['firstaccess'] = array('type' => PARAM_INT);
$fields['lastaccess'] = array('type' => PARAM_INT); $fields['lastaccess'] = array('type' => PARAM_INT);
$fields['lastlogin'] = array('type' => PARAM_INT); $fields['lastlogin'] = array('type' => PARAM_INT);
$fields['currentlogin'] = array('type' => PARAM_INT); $fields['currentlogin'] = array('type' => PARAM_INT);
$fields['lastip'] = array('type' => PARAM_NOTAGS); $fields['lastip'] = array('type' => PARAM_NOTAGS);
$fields['secret'] = array('type' => PARAM_TEXT); $fields['secret'] = array('type' => PARAM_RAW);
$fields['picture'] = array('type' => PARAM_INT); $fields['picture'] = array('type' => PARAM_INT);
$fields['url'] = array('type' => PARAM_URL); $fields['url'] = array('type' => PARAM_URL);
$fields['description'] = array('type' => PARAM_CLEANHTML); $fields['description'] = array('type' => PARAM_RAW);
$fields['descriptionformat'] = array('type' => PARAM_INT); $fields['descriptionformat'] = array('type' => PARAM_INT);
$fields['mailformat'] = array('type' => PARAM_INT); $fields['mailformat'] = array('type' => PARAM_INT);
$fields['maildigest'] = array('type' => PARAM_INT); $fields['maildigest'] = array('type' => PARAM_INT);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment