X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fprofile%2Fgeneral.inc.php;h=b9844725410c552c3bde2c7f2c0d1713bb905404;hb=e716a2af768e3cec3b43bb9814e043d250b5aa9b;hp=8a03a4759712e0bad91d91f20cea6994dae96394;hpb=26ba053e75092d038f571b77eaf3005509da0648;p=platal.git diff --git a/modules/profile/general.inc.php b/modules/profile/general.inc.php index 8a03a47..b984472 100644 --- a/modules/profile/general.inc.php +++ b/modules/profile/general.inc.php @@ -149,7 +149,7 @@ class ProfileSettingSearchNames implements ProfileSetting $this->search_names = array(); foreach ($value as &$sn) { $sn['name'] = trim($sn['name']); - if (S::user()->isMe($this->owner) && ($sn['type'] == 'firstname' || $sn['type'] == 'lastname')) { + if (S::user()->isMe($page->owner) && ($sn['type'] == 'firstname' || $sn['type'] == 'lastname')) { $sn['name'] = $this->prepare($page, $sn['type'], $sn['name'], $initial[$sn['type']], $success_tmp); $success = $success && $success_tmp; @@ -217,7 +217,7 @@ class ProfileSettingSearchNames implements ProfileSetting INNER JOIN profile_name_enum AS e ON (s.typeid = e.id) WHERE s.pid = {?} AND NOT FIND_IN_SET('not_displayed', e.flags)", $page->pid()); - $has_new = set_alias_names($this->search_names, $sn_old, $page->pid(), $page->owner->id()); + $has_new = set_alias_names($this->search_names, $sn_old, $page->pid(), $page->owner); // Only requires validation if modification in public names if ($has_new) {