Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293450

$user->getUsername() should return the username, not the formatted user name

$
0
0

Problem/Motivation

The same way we have getPassword() and getEmail() which return the raw values, I would expect getUsername() to follow the same logic, and not return a formatted user name. Simpletest for example is under the assumption that getUsername() return the value used to log in a user (the username) when it in fact returns the formatter user name (aka real name). See #1929420-22: $account->getUsername() should be used when outputing username in RDF module for an example where this fails.

Proposed resolution

Align getUsername() with getPassword() and getEmail() and return the raw username value (used to login for example). Use label() get the formatted user name.

Remaining tasks

patch

User interface changes

none

API changes

getUsername() returns the raw/db username. label() returns the same as today: the formatted user name.


Viewing all articles
Browse latest Browse all 293450

Trending Articles