"MDL-17143, use record_exists"

This commit is contained in:
dongsheng
2008-11-12 01:51:28 +00:00
parent 43e8791595
commit 6eaf2e376f
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ class user_edit_form extends moodleform {
if ($user = $DB->get_record('user', array('id'=>$userid))) {
// remove description
if (empty($user->description) && !empty($CFG->profilesforenrolledusersonly) && !$DB->get_record('role_assignments', array('userid'=>$userid))) {
if (empty($user->description) && !empty($CFG->profilesforenrolledusersonly) && !$DB->record_exists('role_assignments', array('userid'=>$userid))) {
$mform->removeElement('description');
}