Updates owner's directory name when profile's name has been updated.
authorStéphane Jacob <sj@m4x.org>
Sat, 17 Jul 2010 16:06:48 +0000 (18:06 +0200)
committerStéphane Jacob <sj@m4x.org>
Sat, 17 Jul 2010 16:06:48 +0000 (18:06 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
include/name.func.inc.php

index 2698650..d954263 100644 (file)
@@ -202,9 +202,9 @@ function set_profile_display(&$display_names, Profile $profile)
     $owner = $profile->owner();
     if ($owner) {
         XDB::execute('UPDATE  accounts
-                         SET  full_name = {?}
+                         SET  full_name = {?}, directory_name = {?}
                        WHERE  uid = {?}',
-                     $display_names['public_name'], $owner->id());
+                     $display_names['public_name'], $display_names['directory_name'], $owner->id());
     }
 }