Switch to useing 'get_form_elements_for_user' in Moodle 2.4