If I did not miss something here, the conditional in hook entitycache_flush_user_update()
will always return true. It compares the user's edited name after(!) the change with
the user name on which the operation was performed. Both should be the same at this moment.

Changing the conditional from

old

if ($edit['name'] != $account->name) { 
... 

to new


if ($edit['original']->name != $account->name) { 
...

fixes it in my use case.

Comments

jbiechele’s picture

Title: Username change does not trigger flushing the user's nodes cache » Changing a user's name does not trigger flushing the user's nodes cache
StatusFileSize
new558 bytes

Suggestion for a patch attached.
P.S. changed the title of the issue a bit ;-)

swentel’s picture

You're absolutely right, committed and pushed, thanks. I'll roll out a new release as well.

swentel’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.