Commit de2d81fa authored by Petr Skoda's avatar Petr Skoda
Browse files

MDL-25459 removing option to set picture and tags in admin profile setup form,...

MDL-25459 removing option to set picture and tags in admin profile setup form, we can use these only after setup is finished
parent de8a84e3
......@@ -176,12 +176,12 @@ if ($usernew = $userform->get_data()) {
useredit_update_user_preference($usernew);
// update tags
if (!empty($CFG->usetags)) {
if (!empty($CFG->usetags) and empty($USER->newadminuser)) {
useredit_update_interests($usernew, $usernew->interests);
}
//update user picture
if (!empty($CFG->gdversion)) {
if (!empty($CFG->gdversion) and empty($USER->newadminuser)) {
useredit_update_picture($usernew, $userform);
}
......
......@@ -100,7 +100,7 @@ class user_editadvanced_form extends moodleform {
}
// print picture
if (!empty($CFG->gdversion)) {
if (!empty($CFG->gdversion) and empty($USER->newadminuser)) {
$image_el =& $mform->getElement('currentpicture');
if ($user and $user->picture) {
$image_el->setValue($OUTPUT->user_picture($user, array('courseid'=>SITEID)));
......
......@@ -232,7 +232,7 @@ function useredit_shared_definition(&$mform, $editoroptions = null) {
$mform->setType('description_editor', PARAM_CLEANHTML);
$mform->addHelpButton('description_editor', 'userdescription');
if (!empty($CFG->gdversion)) {
if (!empty($CFG->gdversion) and empty($USER->newadminuser)) {
$mform->addElement('header', 'moodle_picture', get_string('pictureofuser'));
$mform->addElement('static', 'currentpicture', get_string('currentpicture'));
......@@ -248,7 +248,7 @@ function useredit_shared_definition(&$mform, $editoroptions = null) {
}
if (!empty($CFG->usetags)) {
if (!empty($CFG->usetags) and empty($USER->newadminuser)) {
$mform->addElement('header', 'moodle_interests', get_string('interests'));
$mform->addElement('tags', 'interests', get_string('interestslist'), array('display' => 'noofficial'));
$mform->addHelpButton('interests', 'interestslist');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment