Use guest support of UserFunctionTemplatePlugin
authorMarcel Werk <burntime@woltlab.com>
Sun, 14 Feb 2021 11:44:39 +0000 (12:44 +0100)
committerMarcel Werk <burntime@woltlab.com>
Sun, 14 Feb 2021 11:44:39 +0000 (12:44 +0100)
See #3989

14 files changed:
com.woltlab.wcf/templates/articleListItems.tpl
com.woltlab.wcf/templates/authorSidebarBox.tpl
com.woltlab.wcf/templates/boxSidebarCommentList.tpl
com.woltlab.wcf/templates/commentList.tpl
com.woltlab.wcf/templates/commentResponseList.tpl
com.woltlab.wcf/templates/messageQuoteList.tpl
com.woltlab.wcf/templates/moderationArticle.tpl
com.woltlab.wcf/templates/moderationComment.tpl
com.woltlab.wcf/templates/moderationReport.tpl
com.woltlab.wcf/templates/recentActivityListItem.tpl
com.woltlab.wcf/templates/searchResultList.tpl
com.woltlab.wcf/templates/userBirthdayList.tpl
com.woltlab.wcf/templates/userListItem.tpl
com.woltlab.wcf/templates/userProfileLikeItem.tpl

index cb2b593b0b6e44fe8aedc426cc73313ff179694c..28c09c6d655402b256c95b53f7efdf97c684c5d9 100644 (file)
                                
                                <div class="contentItemMetaContent">
                                        <div class="contentItemMetaAuthor">
-                                               {if $article->userID}
-                                                       {user object=$article->getUserProfile()}
-                                               {else}
-                                                       {$article->username}
-                                               {/if}
+                                               {user object=$article->getUserProfile()}
                                        </div>
                                        <div class="contentItemMetaTime">
                                                {@$article->time|time}
index b7b18321e01ad94dd5564fd1aa625d3dff2ef197..1a462410508a08d1920cff06a2fe4b4f7ed839e9 100644 (file)
@@ -5,11 +5,7 @@
                <div>
                        <div class="containerHeadline">
                                <h3>
-                                       {if $userProfile->userID}
-                                               {user object=$userProfile}
-                                       {else}
-                                               {$userProfile->username}
-                                       {/if}
+                                       {user object=$userProfile}
                                </h3>
                                {if MODULE_USER_RANK}
                                        {if $userProfile->getUserTitle()}
index e47a933bf12d42099f2d5ac0ac14e9495b2e2c4b..d098e4298489400e74cca06cdb70e29ea87d8d59 100644 (file)
@@ -9,7 +9,7 @@
                                <small>{@$boxComment->getExcerpt(50)}</small>
                        </div>
                        <div>
-                               <small>{if $boxComment->userID}{user object=$boxComment->getUserProfile()}{else}{$boxComment->username}{/if} <span class="separatorLeft">{@$boxComment->time|time}</span></small>
+                               <small>{user object=$boxComment->getUserProfile()} <span class="separatorLeft">{@$boxComment->time|time}</span></small>
                        </div>
                </li>
        {/foreach}
index 6e577321e56a37598582229a3706d6a57433a6bd..41117aca15e514f2b7cf2c369a722ed596ee4d4c 100644 (file)
                        data-responses="{@$comment->responses}" data-last-response-time="{if $commentLastResponseTime|empty}{@$comment->getLastResponseTime()}{else}{@$commentLastResponseTime}{/if}" data-is-disabled="{@$comment->isDisabled}"
                >
                        <div class="box48{if $__wcf->getUserProfileHandler()->isIgnoredUser($comment->userID)} ignoredUserContent{/if}">
-                               {if $comment->userID}
-                                       {user object=$comment->getUserProfile() type='avatar48' title=$comment->getUserProfile()->username}
-                               {else}
-                                       {@$comment->getUserProfile()->getAvatar()->getImageTag(48)}
-                               {/if}
+                               {user object=$comment->getUserProfile() type='avatar48'}
                                
                                <div class="commentContentContainer" itemprop="comment" itemscope itemtype="http://schema.org/Comment">
                                        <div class="commentContent">
index a772b156959a36a9f8241d4e9220b10315065276..a55bc3c4862006a5d64617013627883eb919849f 100644 (file)
@@ -6,11 +6,7 @@
        {else}
                <li class="commentResponse jsCommentResponse" data-response-id="{@$response->responseID}" {@$__wcf->getReactionHandler()->getDataAttributes('com.woltlab.wcf.comment.response', $response->responseID)} data-can-edit="{if $response->isEditable()}true{else}false{/if}" data-can-delete="{if $response->isDeletable()}true{else}false{/if}" data-user-id="{@$response->userID}">
                        <div class="box32{if $__wcf->getUserProfileHandler()->isIgnoredUser($response->userID)} ignoredUserContent{/if}">
-                               {if $response->userID}
-                                       {user object=$response->getUserProfile() type='avatar48' title=$response->getUserProfile()->username}
-                               {else}
-                                       {@$response->getUserProfile()->getAvatar()->getImageTag(32)}
-                               {/if}
+                               {user object=$response->getUserProfile() type='avatar48'}
                                
                                <div class="commentContent commentResponseContent" itemprop="comment" itemscope itemtype="http://schema.org/Comment">
                                        <meta itemprop="dateCreated" content="{@$response->time|date:'c'}">
index 4ca4c8c1b1b6bfa8711fb4f2458bb60453efd7d0..fcff3a42f5035fed24e441e84750811095ef42cf 100644 (file)
                                                </h2>
                                                
                                                <ul class="messageHeaderMetaData">
-                                                       <li>
-                                                               {if $userProfiles[$message->getUserID()]|isset}
-                                                                       {user object=$userProfiles[$message->getUserID()]}
-                                                               {else}
-                                                                       <span class="username">{$message->getUsername()}</span>
-                                                               {/if}
-                                                       </li>
+                                                       <li>{if $userProfiles[$message->getUserID()]|isset}{user object=$userProfiles[$message->getUserID()]}{else}<span class="username">{$message->getUsername()}</span>{/if}</li>
                                                        <li><span class="messagePublicationTime">{@$message->getTime()|time}</span></li>
                                                        
                                                        {event name='messageHeaderMetaData'}
index f5c1048e0ea9e1ac810c2eaa7baf5dfea1c58982..8a87f6d15a7c339af70b918220fb5fd36c9ddc07 100644 (file)
@@ -2,11 +2,7 @@
        <section class="messageContent">
                <header class="messageHeader">
                        <div class="box32 messageHeaderWrapper">
-                               {if $article->getUserProfile()->userID}
-                                       {user object=$article->getUserProfile() type='avatar32' ariaHidden='true'}
-                               {else}
-                                       <span>{@$article->getUserProfile()->getAvatar()->getImageTag(32)}</span>
-                               {/if}
+                               {user object=$article->getUserProfile() type='avatar32' ariaHidden='true'}
                                
                                <div class="messageHeaderBox">
                                        <h2 class="messageTitle">
                                        </h2>
                                        
                                        <ul class="messageHeaderMetaData">
-                                               <li>
-                                                       {if $article->getUserProfile()->userID}
-                                                               {user object=$article->getUserProfile() class='username'}
-                                                       {else}
-                                                               {$article->getUserProfile()->username}
-                                                       {/if}
-                                               </li>
+                                               <li>{user object=$article->getUserProfile() class='username'}</li>
                                                <li><span class="messagePublicationTime">{@$article->time|time}</span></li>
                                                
                                                {event name='messageHeaderMetaData'}
index e5b99e771a97817b11e021218655526925622496..981c13ef322fc55268d0ff16fbfe2bb2f06adaf9 100644 (file)
@@ -2,11 +2,7 @@
        <section class="messageContent">
                <header class="messageHeader">
                        <div class="box32 messageHeaderWrapper">
-                               {if $message->userID}
-                                       {user object=$message->getUserProfile() type='avatar32' ariaHidden='true'}
-                               {else}
-                                       <span>{@$message->getUserProfile()->getAvatar()->getImageTag(32)}</span>
-                               {/if}
+                               {user object=$message->getUserProfile() type='avatar32' ariaHidden='true'}
                                
                                <div class="messageHeaderBox">
                                        <h2 class="messageTitle">
                                        </h2>
                                        
                                        <ul class="messageHeaderMetaData">
-                                               <li>
-                                                       {if $message->userID}
-                                                               {user object=$message->getUserProfile() class='username'}
-                                                       {else}
-                                                               {$message->getUsername()}
-                                                       {/if}
-                                               </li>
+                                               <li>{user object=$message->getUserProfile() class='username'}</li>
                                                <li><span class="messagePublicationTime">{@$message->getTime()|time}</span></li>
                                                
                                                {event name='messageHeaderMetaData'}
index 38e354d3adfdf1d36ac643e70d54349849bc966f..e7de90e93c123f3b33d080e67f62a60ebe0f9116 100644 (file)
        <h2 class="sectionTitle">{lang}wcf.moderation.report.reportedBy{/lang}</h2>
        
        <div class="box32">
-               {if $reportUser->userID}
-                       {user object=$reportUser type='avatar32' title=$reportUser->username}
-               {else}
-                       <span>{@$reportUser->getAvatar()->getImageTag(32)}</span>
-               {/if}
+               {user object=$reportUser type='avatar32'}
                
                <div>
                        <div class="containerHeadline">
                                <h3>
-                                       {if $reportUser->userID}
-                                               {user object=$reportUser}
-                                       {else}
-                                               {lang}wcf.user.guest{/lang}
-                                       {/if}
-                                       
+                                       {user object=$reportUser}
                                        <small class="separatorLeft">{@$queue->time|time}</small>
                                </h3>
                        </div>
index dcb5e9d4cb626489de7abcc7f80d669e4bc236dd..005264a7a6879cb7917238da1a57517a7017bcb9 100644 (file)
@@ -1,7 +1,7 @@
 {foreach from=$eventList item=event}
        <li>
                <div class="box48{if $__wcf->getUserProfileHandler()->isIgnoredUser($event->getUserProfile()->userID)} ignoredUserContent{/if}">
-                       {user object=$event->getUserProfile() type='avatar48' title=$event->getUserProfile()->username ariaHidden='true'}
+                       {user object=$event->getUserProfile() type='avatar48' ariaHidden='true'}
                        
                        <div>
                                <div class="containerHeadline">
index e58afa75c498ebfdfd0afd6713c7bde02983b128..943090b2f99c8d56020f032e6ac0f824e8f149d6 100644 (file)
@@ -7,11 +7,7 @@
                                        {assign var=_messageCustomIcon value=$customIcons[$_messageObjectHash]}
                                        {if $_messageCustomIcon === ''}
                                                {if $message->getUserProfile()}
-                                                       {if $message->getUserProfile()->userID}
-                                                               {user object=$message->getUserProfile() type='avatar48' title=$message->getUserProfile()->username ariaHidden='true'}
-                                                       {else}
-                                                               <p>{@$message->getUserProfile()->getAvatar()->getImageTag(48)}</p>
-                                                       {/if}
+                                                       {user object=$message->getUserProfile() type='avatar48' ariaHidden='true'}
                                                {else}
                                                        <p><span class="icon icon48 fa-file-o"></span></p>
                                                {/if}
                                                        {if $message->getUserProfile() || $message->getTime() || $message->getContainerTitle()}
                                                                <ul class="inlineList dotSeparated">
                                                                        {if $message->getUserProfile()}
-                                                                               <li>
-                                                                                       {if $message->getUserProfile()->userID}
-                                                                                               {user object=$message->getUserProfile()}
-                                                                                       {else}
-                                                                                               {$message->getUserProfile()->username}
-                                                                                       {/if}
-                                                                               </li>
+                                                                               <li>{user object=$message->getUserProfile()}</li>
                                                                        {/if}
                                                                        {if $message->getTime()}
                                                                                <li><small>{@$message->getTime()|time}</small></li>
index 2ad11bec3574eb9af4de46e64fe772ee9a06edb5..0b4bf74ef4ad58b03429bf4f903441bfdc17984f 100644 (file)
@@ -4,7 +4,7 @@
                        {foreach from=$users item=user}
                                <li data-object-id="{@$user->userID}">
                                        <div class="box48">
-                                               {user object=$user type='avatar48' title=$user->username ariaHidden='true'}
+                                               {user object=$user type='avatar48' ariaHidden='true'}
                                                
                                                <div class="details userInformation">
                                                        <div class="containerHeadline">
index 7ff5925921e3cff1de50cf8e54e9635751a30fd2..d7d79ef83a9b97e9e2e489369d04bf7950e4bb2b 100644 (file)
@@ -1,6 +1,6 @@
 <li data-object-id="{@$user->userID}">
        <div class="box48">
-               {user object=$user type='avatar48' title=$user->username ariaHidden='true'}
+               {user object=$user type='avatar48' ariaHidden='true'}
                
                <div class="details userInformation">
                        {include file='userInformation'}
index f283638476cb9821d1786ea2c5a7443d8be48367..fd11ee9108c9f8e3d1997dd49f4dfa9c93dcd822 100644 (file)
@@ -1,7 +1,7 @@
 {foreach from=$likeList item=like}
        <li>
                <div class="box48">
-                       {user object=$like->getUserProfile() type='avatar48' title=$like->getUserProfile()->username ariaHidden='true'}
+                       {user object=$like->getUserProfile() type='avatar48' ariaHidden='true'}
                        
                        <div>
                                <div class="containerHeadline">