X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fname.func.inc.php;h=272f1e47d845279d6cfe16f19c19a29e98766b2a;hb=28c20b86be8b40cecba0d83080879f81c49e07ad;hp=13d18de6377f5c368399379adce17976926dfdcd;hpb=6115899b252e66b1f6d161c4fd7f439136b49c24;p=platal.git diff --git a/include/name.func.inc.php b/include/name.func.inc.php index 13d18de..272f1e4 100644 --- a/include/name.func.inc.php +++ b/include/name.func.inc.php @@ -198,6 +198,16 @@ function set_profile_display(&$display_names, $pid) $display_names['public_name'], $display_names['private_name'], $display_names['directory_name'], $display_names['short_name'], $display_names['sort_name'], $pid); + + /* XXX: Inefficient, should directly take the profile as parameter */ + $profile = Profile::get($pid); + $owner = $profile->owner(); + if ($owner) { + XDB::execute('UPDATE accounts + SET full_name = {?} + WHERE uid = {?}', + $display_names['public_name'], $owner->id()); + } } function build_sn_pub($pid)