aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2017-12-01 14:43:26 +0300
committerValentin Popov <info@valentineus.link>2017-12-01 14:43:26 +0300
commitafd218e1fd5193873214a54cb4205f74d6098f2d (patch)
tree25501b39ab966e09d317af2ddb01ccce591dd128
parenta80643aeff1e896fcb3171f1fa8db94152431af0 (diff)
downloadtool_managertokens-afd218e1fd5193873214a54cb4205f74d6098f2d.tar.xz
tool_managertokens-afd218e1fd5193873214a54cb4205f74d6098f2d.zip
Added a token generator
-rw-r--r--classes/standard_forms.php1
1 files changed, 1 insertions, 0 deletions
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 */