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.
Use theme_username() to allow theme overrides and modules like RealName to influence username defaults in submission form.
Comment | File | Size | Author |
---|---|---|---|
#4 | print_mail_username.patch | 663 bytes | aether |
#2 | print_mail_username.patch | 662 bytes | aether |
print_mail_username.patch | 700 bytes | aether | |
Comments
Comment #1
jcnventura CreditAttribution: jcnventura commentedWhy are you calling the theme function twice?
Comment #2
aether CreditAttribution: aether commentedNow only called one time.
Comment #3
jcnventura CreditAttribution: jcnventura commentedThe default implementation of theme_username() doesn't accept the plain argument and it returns the HTML pointing to the user page. Since the instances where this string is used require simple text, this patch is unacceptable.
Comment #4
aether CreditAttribution: aether commentedAh, right you are. My implementation was specifically related to the RealName module which provides this argument via override. Would strip_tags offer an acceptable workaround as it is used in this patch or is it bad practice to wrap a theme function like this?
Not sure if the check_plain is needed here and will remove it if it is unnecessary in your opinion and the patch is otherwise acceptable.
Comment #5
jcnventura CreditAttribution: jcnventura commentedCommited to CVS. Thanks for the patch!