Skip to content
Snippets Groups Projects
Commit 9114b5db authored by Tim Steiner's avatar Tim Steiner
Browse files

Prevent a warning message when trying to access the user image of the anonymous user.

git-svn-id: file:///tmp/wdn_thm_drupal/trunk@258 20a16fea-79d4-4915-8869-1ea9d5ebf173
parent f94dceda
Branches
Tags
No related merge requests found
......@@ -165,7 +165,11 @@ function unl_cas_import_user($username) {
}
function unl_cas_preprocess_user_picture(&$variables) {
//Default image: http://planetred.unl.edu/mod/profile/graphics/defaulttopbar.gif
//Default image: http://planetred.unl.edu/mod/profile/graphics/defaultmedium.gif
if ($variables['account']->uid == 0) {
$variables['user_picture'] = 'http://planetred.unl.edu/mod/profile/graphics/defaultmedium.gif';
return;
}
$username = $variables['account']->name;
$variables['user_picture'] = '<img class="profile_pic medium" src="http://planetred.unl.edu/pg/icon/unl_' . $username . '/medium" alt="' . $username . '\'s photo" />';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment