Profile picture with a border color depending of the role
Try hook_preprocess_user_picture() in your template.php

function MYTHEME_preprocess_user_picture(&amp;$vars) {
    $account = user_load($vars['account']-&gt;uid);

    foreach ($account-&gt;roles as $role) {
        $vars['classes_array'][] = 'role-' . strtolower(str_replace(' ', '-', $role));
    }
}


Each user picture should then have the role-rolename classes added to it.
It is similar to Clive's answer you mentioned, but different hook.