Index: ./user/profile/index.php =================================================================== RCS file: /cvsroot/moodle/moodle/user/profile/index.php,v retrieving revision 1.37 diff -r1.37 index.php 45,46c45,46 < < if (data_submitted() and $confirm and confirm_sesskey()) { --- > $fieldcount = $DB->count_records('user_info_field', array('categoryid'=>$id)); > if (data_submitted() and ($confirm and confirm_sesskey()) or $fieldcount===0 ) { 48c48 < redirect($redirect); --- > redirect($redirect,get_string('deleted')); 52d51 < $fieldcount = $DB->count_records('user_info_field', array('categoryid'=>$id)); 62d60 < break; 67c65,66 < if (data_submitted() and $confirm and confirm_sesskey()) { --- > $datacount = $DB->count_records('user_info_data', array('fieldid'=>$id)); > if (data_submitted() and ($confirm and confirm_sesskey()) or $datacount===0 ) { 69c68 < redirect($redirect); --- > redirect($redirect,get_string('deleted')); 73d71 < $datacount = $DB->count_records('user_info_data', array('fieldid'=>$id));