is there any option in moodle php to take username
value in to variable ?
I just wanna take username in to $myUser
when the form loading.
$mform->addElement('text', 'username', get_string('forumname', 'forum'), $attributes);
Reference:- http://docs.moodle.org/dev/lib/formslib.php_Form_Definition#addElement