Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
19 Nov 2010 at 00:05 UTC
Updated:
16 Jun 2015 at 20:38 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dave reidComment #3
dave reidComment #4
Anonymous (not verified) commentedI'm wondering if this is still an issue. Where were the calls to theme_username that used a half-ass user object?
Comment #5
barraponto@linclark probably from theme land :)
Comment #6
dave reidThis still happens in core with format_username(). This still needs to solve the fact that comments can be anonymous, so we'd need to override the loaded $account object with properties from the comment entity before passing it into format_username().
Comment #7
xjmMarked #1554596: Preprocess Node passes wrong object to format_username and #1554576: Preprocess functions passing wrong objects to format_username() as duplicates of this issue.
Comment #8
andrewbelcher commentedI've rerolled against D8 and merged the patches from the two issues xjm has marked as duplicates of this... I'm expecting it to fail on anonymous comment names, as I'm not 100% sure which properties it needs, but hopefully it'll save someone else some time.
Comment #9
andrewbelcher commentedHere is another patch that we might want - requiring the argument to user_format_name() to be a User object. Currently it breaks everything due to the session user being a stdClass, so I doubt we want to apply it before that's fixed, but might be good to do once it is fixed.
Setting to needs review so that patches get tested, but I'm expecting them both to fail...
Comment #12
mgiffordComment #13
andypost8.x already fixed and
format_username()acceptsAccountInterfaceComment #14
andypostthe remaining issue in 8.x