Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Adding a static for whether users can access user profiles makes theme_username() 1/3rd faster internally, and 25% faster in total when called multiple times on a page.
This sort of static will be a real hassle if the active user changes during the life of the request. Thats not uncommon when performing unit tests, for example. I tend to frown on this sort of microcaching.
Display Name Code Sprint Saturday September 5th...
Dave Cohen and I just had a really good face to face discussion with Angie (webchick). In summary, we are going to use the Saturday code sprint to make sure that Drupal 7 will facilitate us building contributed modules to implement display names.
This may mean altering some parts of core in a very small way. If you are passionate about cleaning up "theme_username" throughout core and making it easier for contributed modules to implement display names in a clean and consistent way, then join us at DrupalCon Paris or over the wires.
Saturday September 5th 2009 10:00 to 17:00 CEST
Location: DrupalCon Paris and online elsewhere
If you use IRC then #kendra is ready and waiting for you during those times.
I'll make sure developers are kept well feed and watered. So, if you are at DrupalCon and passionate about making it easy to implement display names then get in touch.
This is pretty much our last chance for making Drupal 7 display name friendly! Let's make it happen!
OK. So, the strategy over the next few weeks (during code sludge) is to get theme_username() used consistently in core. From there contributed modules will be able to implement display names with more ease.
So, if you have time over next few weeks please help Dave Cohen work on the following issue:
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedThis sort of static will be a real hassle if the active user changes during the life of the request. Thats not uncommon when performing unit tests, for example. I tend to frown on this sort of microcaching.
Comment #2
dahacouk CreditAttribution: dahacouk commentedDisplay Name Code Sprint Saturday September 5th...
Dave Cohen and I just had a really good face to face discussion with Angie (webchick). In summary, we are going to use the Saturday code sprint to make sure that Drupal 7 will facilitate us building contributed modules to implement display names.
This may mean altering some parts of core in a very small way. If you are passionate about cleaning up "theme_username" throughout core and making it easier for contributed modules to implement display names in a clean and consistent way, then join us at DrupalCon Paris or over the wires.
Saturday September 5th 2009 10:00 to 17:00 CEST
Location: DrupalCon Paris and online elsewhere
If you use IRC then #kendra is ready and waiting for you during those times.
I'll make sure developers are kept well feed and watered. So, if you are at DrupalCon and passionate about making it easy to implement display names then get in touch.
This is pretty much our last chance for making Drupal 7 display name friendly! Let's make it happen!
Cheers Daniel
username: dahacouk on skype, jabber, irc...
Kendra Initiative - http://www.kendra.org.uk
Comment #3
Gribnif CreditAttribution: Gribnif commentedIn order to avoid Moshe's issue, the cache could be changed to an array, indexed on $user->uid.
Comment #4
dahacouk CreditAttribution: dahacouk commentedOK. So, the strategy over the next few weeks (during code sludge) is to get theme_username() used consistently in core. From there contributed modules will be able to implement display names with more ease.
So, if you have time over next few weeks please help Dave Cohen work on the following issue:
#192056: User's raw login name should not be output directly
Many thanks,
Daniel
Comment #6
catchtheme_username() no longer has this code, it may well be elsewhere closing this out for now., we've also optimized user_access() a bit in the interim.