aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/standard_forms.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/classes/standard_forms.php b/classes/standard_forms.php
index 0ab66d7..2b863a6 100644
--- a/classes/standard_forms.php
+++ b/classes/standard_forms.php
@@ -66,7 +66,7 @@ class token_editor_form extends moodleform {
$mform->addElement("text", "token", new lang_string("password", "moodle"));
$mform->addRule("token", null, "required");
$mform->setDefault("token", generate_password(12));
- $mform->setType("token", PARAM_NOTAGS);
+ $mform->setType("token", PARAM_RAW_TRIMMED);
/* State switching element */
$mform->addElement("advcheckbox", "enabled", new lang_string("enable", "moodle"));
@@ -83,8 +83,7 @@ class token_editor_form extends moodleform {
/* The identifier element */
$mform->addElement("text", "targetid", new lang_string("idnumbermod", "moodle"));
$mform->addRule("targetid", null, "required");
- $mform->setDefault("targetid", 1);
- $mform->setType("targetid", PARAM_INT);
+ $mform->setType("targetid", PARAM_RAW_TRIMMED);
/* The header of constraints */
$mform->addElement("header", "statsuserlogins", new lang_string("statsuserlogins", "moodle"));