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.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1484088_1_author-uid.patch | 589 bytes | scor |
Comments
Comment #1
scor commentedComment #2
cellar door commentedWhat do you think himerus -> 3.2?
Comment #3
himerus commentedThis will go in 3.2, yes.
Comment #4
himerus commentedcommited.