From afd218e1fd5193873214a54cb4205f74d6098f2d Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Fri, 1 Dec 2017 15:43:26 +0400 Subject: Added a token generator --- classes/standard_forms.php | 1 + 1 file changed, 1 insertion(+) (limited to 'classes') diff --git a/classes/standard_forms.php b/classes/standard_forms.php index ab0cd18..cb985bf 100644 --- a/classes/standard_forms.php +++ b/classes/standard_forms.php @@ -65,6 +65,7 @@ class token_editor_form extends moodleform { /* Entry element of the token */ $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); /* State switching element */ -- cgit v1.2.3