#48714, theme_user_picture should take "access user profiles" in to account, patch by frjo

4.7.x
Gerhard Killesreiter 2006-03-28 12:40:13 +00:00
parent cb49e19e9e
commit 8447307ed2
2 changed files with 2 additions and 2 deletions

View File

@ -629,7 +629,7 @@ function theme_user_picture($account) {
if (isset($picture)) {
$alt = t('%user\'s picture', array('%user' => $account->name ? $account->name : variable_get('anonymous', 'Anonymous')));
$picture = theme('image', $picture, $alt, $alt, '', false);
if (!empty($account->uid)) {
if (!empty($account->uid) && user_access('access user profiles')) {
$picture = l($picture, "user/$account->uid", array('title' => t('View user profile.')), NULL, NULL, FALSE, TRUE);
}

View File

@ -629,7 +629,7 @@ function theme_user_picture($account) {
if (isset($picture)) {
$alt = t('%user\'s picture', array('%user' => $account->name ? $account->name : variable_get('anonymous', 'Anonymous')));
$picture = theme('image', $picture, $alt, $alt, '', false);
if (!empty($account->uid)) {
if (!empty($account->uid) && user_access('access user profiles')) {
$picture = l($picture, "user/$account->uid", array('title' => t('View user profile.')), NULL, NULL, FALSE, TRUE);
}