Closed (fixed)
Project:
Drupal core
Version:
8.7.x-dev
Component:
user.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Aug 2016 at 08:46 UTC
Updated:
22 Oct 2018 at 10:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
didebruWe should exchange the url() method with the equivalent. Is it urlgenerator()?
Comment #3
prashant.cSubmitting a patch against 8.3.x version.Replaced all the instances of
getUsername() withgetDisplayName().Comment #5
yogeshmpawarI have rerolled the patch for 8.2.x version.
Replaced all the instances of
getUsername()withgetDisplayName().Comment #6
yogeshmpawarComment #8
catchNot every occurrence can be changed to getDisplayName(), some need to be changed to getAccountName()
Comment #10
yogeshmpawarrerolled the patch as per requirement.
Comment #12
yogeshmpawarAny Update on this issue ?
Comment #14
idebr commentedThe scope creep in #3 makes this a duplicate of #2629286: Use getDisplayName() for user names consistently
Comment #17
alexpottI'm not sure this is the correct change. You're logged in as a user and you got the password reset link for another. In both cases according to the docs we should be using getAccountName() no - because here we are dealing with log in details.
This was changed by #2746065: Profile page's title/heading does not fulfill hook_user_format_name_alter to getDisplayName() and that's right because this is displayed to all users and not login information.
Comment #18
alexpottI've updated the issue summary to reflect the full scope of work to carry out here. Now fixing the title.
Comment #19
alexpottThis should be getAccountName() - it is a log message.
This is login details stuff - imo should getAccountName()
getAccountName()
Comment #20
alexpottAs #14 points out #2629286: Use getDisplayName() for user names consistently is prior art and actually is the single issue where all this should be fixed :( ho hum going to update that issue now. Closing a duplicate
Comment #21
alexpottThought about this some more. What we can do here is do the proper deprecation and then in #2629286: Use getDisplayName() for user names consistently do the proper usage part. This means that issue will have less to do.
Comment #22
alexpottComment #23
alexpottComment #24
hass commentedThe username/accountname/displayname conversion is already done in #2629286: Use getDisplayName() for user names consistently. Do not break all efforts, please!
Comment #25
alexpott@hass please read and understand https://www.drupal.org/core/scope there is a reason why https://www.drupal.org/project/drupal/issues/2629286 is taking ages to get done.
Comment #26
alexpottFor a longer explanation of #25 see #2629286-165: Use getDisplayName() for user names consistently
Comment #27
hass commentedWe can split the AccountName/Display name out of the other patch and follow up with tests later. ONLY the tests hold the other case back and this is caused by bugs committed for several years to core. The rest of the patch is fine and all you'd like to commit here.
Comment #28
hass commentedLooks good.
Comment #29
alexpottRerolled on top of 8.7.x HEAD. There were three very minor conflicts:
Comment #31
alexpottAnd this is why we need to do proper deprecations. Because new usages creep in.
Comment #32
catchCommitted d8a6a68 and pushed to 8.7.x. Thanks!