FIX: Show email for staged users in user cards. (#7354)

FIX: Show email for staged users in user cards. (#7354)

diff --git a/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs b/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs
index 2354747..cf45d78 100644
--- a/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs
+++ b/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs
@@ -145,16 +145,16 @@
       </div>
     {{/if}}
 
-    {{#if user.time_read}}
-      <div class="card-row fourth-row">
-        {{#unless user.profile_hidden}}
-          <div class="metadata">
-            {{#if user.last_posted_at}}
-              <h3><span class='desc'>{{i18n 'last_post'}}</span>
-                {{format-date user.last_posted_at leaveAgo="true"}}</h3>
-            {{/if}}
-            <h3><span class='desc'>{{i18n 'joined'}}</span>
-              {{format-date user.created_at leaveAgo="true"}}</h3>
+    <div class="card-row fourth-row">
+      {{#unless user.profile_hidden}}
+        <div class="metadata">
+          {{#if user.last_posted_at}}
+            <h3><span class='desc'>{{i18n 'last_post'}}</span>
+              {{format-date user.last_posted_at leaveAgo="true"}}</h3>
+          {{/if}}
+          <h3><span class='desc'>{{i18n 'joined'}}</span>
+            {{format-date user.created_at leaveAgo="true"}}</h3>
+          {{#if user.time_read}}
             <h3 title="{{timeReadTooltip}}">
               <span class='desc'>{{i18n 'time_read'}}</span>
               {{format-duration user.time_read}}
@@ -162,27 +162,27 @@
                 <span>({{i18n 'time_read_recently' time_read=recentTimeRead}})</span>
               {{/if}}
             </h3>
-            {{#if showCheckEmail}}
-              <h3 class="email">
-                {{d-icon "far-envelope" title="user.email.title"}}
-                {{#if user.email}}
-                  {{user.email}}
-                {{else}}
-                  {{d-button
-                  action=(action "checkEmail")
-                  actionParam=user
-                  icon="far-envelope"
-                  label="admin.users.check_email.text"
-                  class="btn-primary"}}
-                {{/if}}
-              </h3>
-            {{/if}}
-            {{plugin-outlet name="user-card-metadata" args=(hash user=user)}}
-          </div>
-        {{/unless}}
-        {{plugin-outlet name="user-card-after-metadata" args=(hash user=user)}}
-      </div>
-    {{/if}}
+          {{/if}}
+          {{#if showCheckEmail}}
+            <h3 class="email">
+              {{d-icon "far-envelope" title="user.email.title"}}
+              {{#if user.email}}
+                {{user.email}}
+              {{else}}
+                {{d-button
+                action=(action "checkEmail")
+                actionParam=user
+                icon="far-envelope"
+                label="admin.users.check_email.text"
+                class="btn-primary"}}
+              {{/if}}
+            </h3>
+          {{/if}}
+          {{plugin-outlet name="user-card-metadata" args=(hash user=user)}}
+        </div>
+      {{/unless}}
+      {{plugin-outlet name="user-card-after-metadata" args=(hash user=user)}}
+    </div>
 
     {{#if publicUserFields}}
       <div class="card-row fifth-row">

GitHub sha: 0e9a0a31

1 Like