/** * Adds fields to this form that are relevant to the user making the request */ protected function add_user_info() { // add the standard fields parent::add_user_info(); $mform =& $this->_form; // disable editing of firstname, lastname and email $mform->hardFreeze('first'); $mform->hardFreeze('last'); $mform->hardFreeze('email'); }