Page MenuHomePhabricator

Add RenameUser hook for SocialProfile
Closed, ResolvedPublic

Description

Author: g33kdyoo

Description:
A hook should be added to SocialProfile that updates various user name values. An example for friendships:
mysql> update user_relationship set r_user_name_relation="Andrew" where r_user_name_relation="Frozen Wind";
Query OK, 6 rows affected (0.01 sec)
Rows matched: 6 Changed: 6 Warnings: 0

mysql> update user_relationship set r_user_name="Andrew" where r_user_name="Frozen Wind";
Query OK, 6 rows affected (0.00 sec)
Rows matched: 6 Changed: 6 Warnings: 0

mysql>


Version: unspecified
Severity: enhancement

Details

Reference
bz25863

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:16 PM
bzimport added a project: SocialProfile.
bzimport set Reference to bz25863.

This is already mostly done, see SocialProfile.php (http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SocialProfile/SocialProfile.php?view=markup). As I noted in the source code comments, for some reason the hooked function for user_relationship table updates only half of the rows. I'd rather have that fixed first and then uncomment these bits of code, but quite honestly I have no idea whatsoever what's causing that behavior. I tried asking Werdna earlier this year about what might be causing this (see http://www.mediawiki.org/wiki/Thread:User_talk:Werdna/SocialProfile,_RenameUser_and_RenameUserSQL_hook) as he's the developer who added the RenameUserSQL hook into the RenameUser extension, but he didn't have any idea either.