Profile picture with a border color depending of the role Is there any way to set a border color to every profile picture displayed all over the website depending on the role of the user?

I was trying to do it at least on the user profile image and on the User picture block module image following this instructions Custom node color from role but I ended in nothing.

Note: I display the profile pictures in a user search view, in the forums and in a block that display the latest forum comments.
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.