Commit 8447307e authored by Gerhard Killesreiter's avatar Gerhard Killesreiter
Browse files

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

parent cb49e19e
...@@ -629,7 +629,7 @@ function theme_user_picture($account) { ...@@ -629,7 +629,7 @@ function theme_user_picture($account) {
if (isset($picture)) { if (isset($picture)) {
$alt = t('%user\'s picture', array('%user' => $account->name ? $account->name : variable_get('anonymous', 'Anonymous'))); $alt = t('%user\'s picture', array('%user' => $account->name ? $account->name : variable_get('anonymous', 'Anonymous')));
$picture = theme('image', $picture, $alt, $alt, '', false); $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); $picture = l($picture, "user/$account->uid", array('title' => t('View user profile.')), NULL, NULL, FALSE, TRUE);
} }
......
...@@ -629,7 +629,7 @@ function theme_user_picture($account) { ...@@ -629,7 +629,7 @@ function theme_user_picture($account) {
if (isset($picture)) { if (isset($picture)) {
$alt = t('%user\'s picture', array('%user' => $account->name ? $account->name : variable_get('anonymous', 'Anonymous'))); $alt = t('%user\'s picture', array('%user' => $account->name ? $account->name : variable_get('anonymous', 'Anonymous')));
$picture = theme('image', $picture, $alt, $alt, '', false); $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); $picture = l($picture, "user/$account->uid", array('title' => t('View user profile.')), NULL, NULL, FALSE, TRUE);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment