Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
theme system
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Jul 2007 at 21:18 UTC
Updated:
21 Feb 2008 at 15:48 UTC
Related to http://drupal.org/node/155254.
Add an optional $link param to theme_username to control whether name should be displayed as a link or just text. This will allow us to use theme('username', $object, FALSE) in core if we want to just show the textual name.
| Comment | File | Size | Author |
|---|---|---|---|
| username.link_.patch | 1.52 KB | RobRoy |
Comments
Comment #1
catchno longer applies. Small enough to leave in D6 issue queue though I think.
Comment #2
dvessel commentedIt gets linked based on permission to view profiles.
In what situation would you force it as text even for users with view permissions on profiles.
Comment #3
geodaniel commentedThe situation would be, for example, if you wanted to theme a user's username as part of a page title (e.g in user module, contact module, etc). Instead of showing their username, you may want to theme it to display information from their profile data instead, and without this patch you'd be forced to use the generated HTML link.
Comment #4
geodaniel commentedSee also #192056: User's raw login name should not be output directly
Comment #5
Arto commentedThis would be a useful feature. Subscribing.
Comment #6
geodaniel commentedI think the other way (#192056) of doing this would be a better route to go in the long-run, so I'm going to mark this as a duplicate.