MDL-32787 user: rule required for custom profile fields applies to all users editing own profile

This commit is contained in:
Rajesh Taneja
2012-07-03 13:46:13 +08:00
parent d71b79a406
commit fc3aa0fbaf
5 changed files with 39 additions and 26 deletions
+2 -1
View File
@@ -165,7 +165,8 @@ $user->imagefile = $draftitemid;
//create form
$userform = new user_edit_form(null, array(
'editoroptions' => $editoroptions,
'filemanageroptions' => $filemanageroptions));
'filemanageroptions' => $filemanageroptions,
'userid' => $user->id));
if (empty($user->country)) {
// MDL-16308 - we must unset the value here so $CFG->country can be used as default one
unset($user->country);