In template.php:

  // Add a class to allow styling based on the node author.
  $vars['attributes_array']['class'][] = drupal_html_class('author-' . $vars['node']->name);

using the user name here isn't the most robust information about the user in the case for example of a name change. It is also not friendly to methods where the obfuscating the username is wanted.

Using the user id seems like a more robust approach here, since the uid does not change unless the username.

CommentFileSizeAuthor
#1 1484088_1_author-uid.patch589 bytesscor
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scor’s picture

Status: Active » Needs review
FileSize
589 bytes
Cellar Door’s picture

Assigned: Unassigned » himerus

What do you think himerus -> 3.2?

himerus’s picture

This will go in 3.2, yes.

himerus’s picture

Assigned: himerus » Unassigned
Status: Needs review » Fixed

commited.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.