From 1b8d30c54ee3cbdf073accad5841ce988a6cc4bf Mon Sep 17 00:00:00 2001
From: Jimmy Berry <jimmy@boombatower.com>
Date: Tue, 22 Mar 2011 16:15:33 -0500
Subject: Change theme_username() to always create a link for current user.

---
 includes/theme.inc |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/includes/theme.inc b/includes/theme.inc
index 806e5ee..0d0096c 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -2539,6 +2539,7 @@ function template_preprocess_region(&$variables) {
  * @see template_process_username()
  */
 function template_preprocess_username(&$variables) {
+  global $user;
   $account = $variables['account'];
 
   $variables['extra'] = '';
@@ -2563,7 +2564,7 @@ function template_preprocess_username(&$variables) {
   }
   $variables['name'] = check_plain($name);
 
-  $variables['profile_access'] = user_access('access user profiles');
+  $variables['profile_access'] = $user->uid == $account->uid || user_access('access user profiles');
   $variables['link_attributes'] = array();
   // Populate link path and attributes if appropriate.
   if ($variables['uid'] && $variables['profile_access']) {
-- 
1.7.4.1

