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:42:45 +08:00
parent 116714e8dc
commit 4598cc934a
5 changed files with 29 additions and 16 deletions
+1 -1
View File
@@ -153,7 +153,7 @@ $editoroptions = array(
);
$user = file_prepare_standard_editor($user, 'description', $editoroptions, $personalcontext, 'user', 'profile', 0);
$userform = new user_edit_form(null, array('editoroptions'=>$editoroptions));
$userform = new user_edit_form(null, array('editoroptions'=>$editoroptions, '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);