Added missing check for privacy settings
authorMarcel Werk <burntime@woltlab.com>
Mon, 7 Oct 2013 11:42:50 +0000 (13:42 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 7 Oct 2013 11:42:50 +0000 (13:42 +0200)
com.woltlab.wcf/templates/messageSidebar.tpl
com.woltlab.wcf/templates/userInformationHeadline.tpl
com.woltlab.wcf/templates/userProfilePreview.tpl

index f84a7b68629a0dc63e2878b287d9cc9b926631eb..da58d5499d3455a3b3ea9c2db9b545db99422a04 100644 (file)
@@ -80,7 +80,7 @@
                                                                <dd>{#$userProfile->activityPoints}</dd>
                                                        {/if}
                                                        {event name='userCredits'}
-                                                       {if MESSAGE_SIDEBAR_USER_OPTIONS}
+                                                       {if MESSAGE_SIDEBAR_USER_OPTIONS && $userProfile->isAccessible('canViewProfile')}
                                                                {assign var='__sidebarUserOptions' value=','|explode:MESSAGE_SIDEBAR_USER_OPTIONS}
                                                                {foreach from=$__sidebarUserOptions item='__sidebarUserOption'}
                                                                        {if $userProfile->getUserOption($__sidebarUserOption)}
index 81e6d1c4fdbc8f465c29753b33cf9421587e958c..c18492064bdde094de01aa9fa51df8e893706a26 100644 (file)
@@ -2,9 +2,11 @@
        <h3><a href="{link controller='User' object=$user}{/link}">{$user->username}</a>{if MODULE_USER_RANK && $user->getUserTitle()} <span class="badge userTitleBadge{if $user->getRank() && $user->getRank()->cssClassName} {@$user->getRank()->cssClassName}{/if}">{$user->getUserTitle()}</span>{/if}</h3> 
 </div>
 <ul class="dataList userFacts">
-       {if $user->gender}<li>{lang}wcf.user.gender.{if $user->gender == 1}male{else}female{/if}{/lang}</li>{/if}
-       {if $user->getAge()}<li>{@$user->getAge()}</li>{/if}
-       {if $user->location}<li>{lang}wcf.user.membersList.location{/lang}</li>{/if}
+       {if $user->isAccessible('canViewProfile')}
+               {if $user->gender}<li>{lang}wcf.user.gender.{if $user->gender == 1}male{else}female{/if}{/lang}</li>{/if}
+               {if $user->getAge()}<li>{@$user->getAge()}</li>{/if}
+               {if $user->location}<li>{lang}wcf.user.membersList.location{/lang}</li>{/if}
+       {/if}
        <li>{lang}wcf.user.membersList.registrationDate{/lang}</li>
        
        {event name='userData'}                 
index eb27f3a7f70c66dfeb5d54cb9f36248c42e2eb00..edfc0a24097fa3717f1f5e4119ce2fae1aae1a03 100644 (file)
                        {hascontent}
                                <dl class="plain inlineDataList userFields">
                                        {content}
-                                               {if $user->occupation}
-                                                       <dt>{lang}wcf.user.option.occupation{/lang}</dt>
-                                                       <dd>{$user->occupation}</dd>
-                                               {/if}
-                                               {if $user->hobbies}
-                                                       <dt>{lang}wcf.user.option.hobbies{/lang}</dt>
-                                                       <dd>{$user->hobbies}</dd>
+                                               {if $user->isAccessible('canViewProfile')}
+                                                       {if $user->occupation}
+                                                               <dt>{lang}wcf.user.option.occupation{/lang}</dt>
+                                                               <dd>{$user->occupation}</dd>
+                                                       {/if}
+                                                       {if $user->hobbies}
+                                                               <dt>{lang}wcf.user.option.hobbies{/lang}</dt>
+                                                               <dd>{$user->hobbies}</dd>
+                                                       {/if}
                                                {/if}
                                                {event name='userFields'}
                                        {/content}