Index: trunk/kernel/units/user_profile/user_profile_eh.php =================================================================== diff -u -N -r8615 -r8636 --- trunk/kernel/units/user_profile/user_profile_eh.php (.../user_profile_eh.php) (revision 8615) +++ trunk/kernel/units/user_profile/user_profile_eh.php (.../user_profile_eh.php) (revision 8636) @@ -10,6 +10,7 @@ { parent::mapPermissions(); $permissions = Array ( + 'OnItemBuild' => Array('subitem' => true), 'OnUpdate' => Array('subitem' => true), ); @@ -23,11 +24,17 @@ */ function OnUpdate(&$event) { - $items_info = $this->Application->GetVar('user_profile'); + $items_info = $this->Application->GetVar($event->getPrefixSpecial(true)); + list ($user_id, $field_values) = each($items_info); - foreach ($items_info as $variable_name => $variable_value) { - $this->Application->StorePersistentVar($variable_name, $variable_value); + if ($user_id != $this->Application->RecallVar('user_id')) { + // we are not updating own profile + return ; } + + foreach ($field_values as $variable_name => $variable_value) { + $this->Application->StorePersistentVar($variable_name, unhtmlentities($variable_value)); + } }