{{#if model.canViewProfile}} {{#link-to "user" model class="btn btn-default"}} {{d-icon "user"}} {{i18n "admin.user.show_public_profile"}} {{/link-to}} {{/if}} {{#if model.can_view_action_logs}} {{d-button action=(action "viewActionLogs") class="btn-default" actionParam=model.username icon="far-list-alt" label="admin.user.action_logs"}} {{/if}} {{#if model.active}} {{#if currentUser.admin}} {{d-button class="btn-default" action=(action "logOut") icon="power-off" label="admin.user.log_out"}} {{/if}} {{/if}} {{plugin-outlet name="admin-user-controls-after" args=(hash model=model) tagName="" connectorTagName=""}}
{{admin-editable-field name="user.username.title" value=model.username action=(action "saveUsername") editing=editingUsername}}
{{admin-editable-field name="user.name.title" value=model.name action=(action "saveName") editing=editingName}}
{{plugin-outlet name="admin-user-below-names" args=(hash user=model) tagName="" connectorTagName=""}} {{#if canCheckEmails}}
{{i18n "user.email.primary"}}
{{#unless model.active}}
{{i18n "admin.users.not_verified"}}
{{/unless}} {{#if model.email}} {{model.email}} {{else}} {{d-button class="btn-default" action=(route-action "checkEmail") actionParam=model icon="far-envelope" label="admin.users.check_email.text" title="admin.users.check_email.title"}} {{/if}}
{{i18n "user.email.secondary"}}
{{#if model.email}} {{#if model.secondary_emails}}
    {{#each model.secondary_emails as |email| }}
  • {{email}}
  • {{/each}}
{{else}} {{i18n "user.email.no_secondary"}} {{/if}} {{else}} {{d-button action=(route-action "checkEmail") class="btn-default" actionParam=model icon="far-envelope" label="admin.users.check_email.text" title="admin.users.check_email.title"}} {{/if}}
{{model.bounceScore}}
{{#if model.canResetBounceScore}} {{d-button class="btn-default" action=(action "resetBounceScore") label="admin.user.reset_bounce_score.label" title="admin.user.reset_bounce_score.title"}} {{/if}} {{model.bounceScoreExplanation}}
{{i18n "user.associated_accounts.title"}}
{{#if associatedAccountsLoaded}} {{associatedAccounts}} {{else}} {{d-button class="btn-default" action=(route-action "checkEmail") actionParam=model icon="far-envelope" label="admin.users.check_email.text" title="admin.users.check_email.title"}} {{/if}}
{{/if}}
{{i18n "user.avatar.title"}}
{{avatar model imageSize="large"}}
{{{i18n "admin.user.visit_profile" url=preferencesPath}}}
{{admin-editable-field name="user.title.title" value=model.title action=(action "saveTitle") editing=editingTitle}}
{{i18n "user.ip_address.title"}}
{{model.ip_address}}
{{#if currentUser.staff}} {{d-button class="btn-default" action=(action "refreshBrowsers") label="admin.user.refresh_browsers"}} {{ip-lookup ip=model.ip_address userId=model.id}} {{/if}}
{{i18n "user.registration_ip_address.title"}}
{{model.registration_ip_address}}
{{#if currentUser.staff}} {{ip-lookup ip=model.registration_ip_address userId=model.id}} {{/if}}
{{#if showBadges}}
{{i18n "admin.badges.title"}}
{{i18n "badges.badge_count" count=model.badge_count}}
{{#link-to "adminUser.badges" model class="btn"}} {{d-icon "certificate"}} {{i18n "admin.badges.edit_badges"}} {{/link-to}}
{{/if}}
{{i18n "user.second_factor.title"}}
{{#if model.second_factor_enabled}} {{i18n "yes_value"}} {{else}} {{i18n "no_value"}} {{/if}}
{{#if canDisableSecondFactor}} {{d-button class="btn-default" action=(action "disableSecondFactor") icon="unlock-alt" label="user.second_factor.disable"}} {{/if}}
{{#if userFields}}
{{#each userFields as |uf|}}
{{uf.name}}
{{#if uf.value}} {{uf.value}} {{else}} — {{/if}}
{{/each}}
{{/if}} {{plugin-outlet name="admin-user-details" args=(hash model=model)}}

{{i18n "admin.user.permissions"}}

{{#if showApproval}}
{{i18n "admin.users.approved"}}
{{#if model.approved}} {{i18n "admin.user.approved_by"}} {{#link-to "adminUser" model.approvedBy}} {{avatar model.approvedBy imageSize="small"}} {{/link-to}} {{#link-to "adminUser" model.approvedBy}} {{model.approvedBy.username}} {{/link-to}} {{else}} {{i18n "no_value"}} {{/if}}
{{#if model.approved}} {{i18n "admin.user.approve_success"}} {{else}} {{#if model.can_approve}} {{d-button class="btn-default" action=(action "approve") icon="check" label="admin.user.approve"}} {{/if}} {{/if}}
{{/if}}
{{i18n "admin.users.active"}}
{{i18n-yes-no model.active}}
{{#if model.active}} {{#if model.can_deactivate}} {{d-button class="btn-default" action=(action "deactivate") label="admin.user.deactivate_account"}} {{i18n "admin.user.deactivate_explanation"}} {{/if}} {{else}} {{#if model.can_send_activation_email}} {{d-button class="btn-default" action=(action "sendActivationEmail") icon="envelope" label="admin.user.send_activation_email"}} {{/if}} {{#if model.can_activate}} {{d-button class="btn-default" action=(action "activate") icon="check" label="admin.user.activate"}} {{/if}} {{/if}}
{{i18n "admin.user.staged"}}
{{i18n-yes-no model.staged}}
{{i18n "admin.user.staged_explanation"}}
{{#if currentUser.admin}}
{{i18n "admin.api.key"}}
{{#if model.api_key}}
{{model.api_key.key}} {{d-button class="btn-default" action=(action "regenerateApiKey") icon="undo" label="admin.api.regenerate"}} {{d-button class="btn-default" action=(action "revokeApiKey") icon="times" label="admin.api.revoke"}}
{{else}}
{{d-button class="btn-default" action=(action "generateApiKey") icon="key" label="admin.api.generate"}}
{{/if}}
{{/if}}
{{i18n "admin.user.admin"}}
{{i18n-yes-no model.admin}}
{{#if model.can_revoke_admin}} {{d-button class="btn-default" action=(action "revokeAdmin") icon="shield-alt" label="admin.user.revoke_admin"}} {{/if}} {{#if model.can_grant_admin}} {{d-button class="btn-default" action=(action "grantAdmin") icon="shield-alt" label="admin.user.grant_admin"}} {{/if}}
{{i18n "admin.user.moderator"}}
{{i18n-yes-no model.moderator}}
{{#if model.can_revoke_moderation}} {{d-button class="btn-default" action=(action "revokeModeration") icon="shield-alt" label="admin.user.revoke_moderation"}} {{/if}} {{#if model.can_grant_moderation}} {{d-button class="btn-default" action=(action "grantModeration") icon="shield-alt" label="admin.user.grant_moderation"}} {{/if}}
{{i18n "trust_level"}}
{{combo-box content=site.trustLevels value=model.trust_level nameProperty="detailedName"}} {{#if model.dirty}}
{{d-button class="ok no-text" action=(action "saveTrustLevel") icon="check"}} {{d-button class="cancel no-text" action=(action "restoreTrustLevel") icon="times"}}
{{/if}}
{{#if model.canLockTrustLevel}} {{#if hasLockedTrustLevel}} {{d-icon "lock" title="admin.user.trust_level_locked_tip"}} {{d-button class="btn-default" action=(action "lockTrustLevel") actionParam=false label="admin.user.unlock_trust_level"}} {{else}} {{d-icon "unlock" title="admin.user.trust_level_unlocked_tip"}} {{d-button class="btn-default" action=(action "lockTrustLevel") actionParam=true label="admin.user.lock_trust_level"}} {{/if}} {{/if}} {{#if model.tl3Requirements}} {{#link-to "adminUser.tl3Requirements" model class="btn btn-default"}} {{i18n "admin.user.trust_level_3_requirements"}} {{/link-to}} {{/if}}
{{i18n "admin.user.suspended"}}
{{i18n-yes-no model.suspended}} {{#if model.suspended}} {{#unless model.suspendedForever}} {{i18n "admin.user.suspended_until" until=model.suspendedTillDate}} {{/unless}} {{/if}}
{{#if model.suspended}} {{d-button class="btn-danger unsuspend-user" action=(action "unsuspend") icon="ban" label="admin.user.unsuspend"}} {{i18n "admin.user.suspended_explanation"}} {{else}} {{#if model.canSuspend}} {{d-button class="btn-danger suspend-user" action=(action "showSuspendModal") icon="ban" label="admin.user.suspend"}} {{i18n "admin.user.suspended_explanation"}} {{/if}} {{/if}}
{{#if model.suspended}}
{{i18n "admin.user.suspended_by"}}
{{#link-to "adminUser" model.suspendedBy}} {{avatar model.suspendedBy imageSize="tiny"}} {{/link-to}} {{#link-to "adminUser" model.suspendedBy}} {{model.suspendedBy.username}} {{/link-to}}
{{i18n "admin.user.suspend_reason"}}:
{{model.full_suspend_reason}}
{{/if}}
{{i18n "admin.user.silenced"}}
{{i18n-yes-no model.silenced}} {{#if model.silenced}} {{#unless model.silencedForever}} {{i18n "admin.user.suspended_until" until=model.silencedTillDate}} {{/unless}} {{/if}}
{{#conditional-loading-spinner size="small" condition=model.silencingUser}} {{#if model.silenced}} {{d-button class="btn-danger unsilence-user" action=(action "unsilence") icon="microphone-slash" label="admin.user.unsilence"}} {{i18n "admin.user.silence_explanation"}} {{else}} {{d-button class="btn-danger silence-user" action=(action "showSilenceModal") icon="microphone-slash" label="admin.user.silence"}} {{i18n "admin.user.silence_explanation"}} {{/if}} {{/conditional-loading-spinner}}
{{#if model.silenced}}
{{i18n "admin.user.silenced_by"}}
{{#link-to "adminUser" model.silencedBy}} {{avatar model.silencedBy imageSize="tiny"}} {{/link-to}} {{#link-to "adminUser" model.silencedBy}} {{model.silencedBy.username}} {{/link-to}}
{{i18n "admin.user.silence_reason"}}:
{{model.silence_reason}}
{{/if}} {{#if model.tl3_requirements.penalty_counts.total}}
{{i18n "admin.user.penalty_count"}}
{{model.tl3_requirements.penalty_counts.total}}
{{#if currentUser.admin}}
{{d-button label="admin.user.clear_penalty_history.title" class="btn-default" icon="times" action=(action "clearPenaltyHistory")}} {{i18n "admin.user.clear_penalty_history.description"}}
{{/if}}
{{/if}}
{{#if currentUser.admin}}

{{i18n "admin.groups.title"}}

{{i18n "admin.groups.automatic"}}
{{{automaticGroups}}}
{{i18n "admin.groups.custom"}}
{{admin-group-selector selected=model.customGroups available=availableGroups buffer=customGroupIdsBuffer}}
{{#if customGroupsDirty}}
{{d-button icon="check" class="ok" action=(action "saveCustomGroups")}} {{d-button icon="times" class="cancel" action=(action "resetCustomGroups")}}
{{/if}}
{{#if model.customGroups}}
{{i18n "admin.groups.primary"}}
{{combo-box content=model.customGroups value=model.primary_group_id none="admin.groups.no_primary"}}
{{#if primaryGroupDirty}}
{{d-button icon="check" class="ok" action=(action "savePrimaryGroup")}} {{d-button icon="times" class="cancel" action=(action "resetPrimaryGroup")}}
{{/if}}
{{/if}}
{{/if}}

{{i18n "admin.user.activity"}}

{{i18n "created"}}
{{format-date model.created_at leaveAgo="true"}}
{{i18n "admin.users.last_emailed"}}
{{format-date model.last_emailed_at}}
{{i18n "last_seen"}}
{{format-date model.last_seen_at leaveAgo="true"}}
{{i18n "admin.user.like_count"}}
{{model.like_given_count}} / {{model.like_count}}
{{i18n "admin.user.topics_entered"}}
{{model.topics_entered}}
{{i18n "admin.user.post_count"}}
{{model.post_count}}
{{#if model.can_delete_all_posts}} {{#if model.post_count}} {{d-button class="btn-danger" action=(action "deleteAllPosts") icon="far-trash-alt" label="admin.user.delete_all_posts"}} {{/if}} {{else}} {{deleteAllPostsExplanation}} {{/if}}
{{i18n "admin.user.posts_read_count"}}
{{model.posts_read_count}}
{{i18n "admin.user.warnings_received_count"}}
{{model.warnings_received_count}}
{{i18n "admin.user.flags_given_received_count"}}
{{model.flags_given_count}} / {{model.flags_received_count}}
{{#if model.flags_received_count}} {{d-button class="btn-default" action=(action "showFlagsReceived") label="admin.user.show_flags_received" icon="flag" }} {{/if}}
{{i18n "admin.user.private_topics_count"}}
{{model.private_topics_count}}
{{i18n "admin.user.time_read"}}
{{{format-duration model.time_read}}}
{{i18n "user.invited.days_visited"}}
{{{model.days_visited}}}
{{#if model.single_sign_on_record}}

{{i18n "admin.user.sso.title"}}

{{#with model.single_sign_on_record as |sso|}}
{{i18n "admin.user.sso.external_id"}}
{{sso.external_id}}
{{i18n "admin.user.sso.external_username"}}
{{sso.external_username}}
{{i18n "admin.user.sso.external_name"}}
{{sso.external_name}}
{{#if sso.external_email}}
{{i18n "admin.user.sso.external_email"}}
{{sso.external_email}}
{{/if}}
{{i18n "admin.user.sso.external_avatar_url"}}
{{sso.external_avatar_url}}
{{/with}}
{{/if}} {{plugin-outlet name="after-user-details" args=(hash model=model)}}

{{#if model.active}} {{#if model.can_impersonate}} {{d-button class="btn-danger" action=(action "impersonate") icon="crosshairs" label="admin.impersonate.title" title="admin.impersonate.help"}} {{/if}} {{/if}} {{#if model.can_be_anonymized}} {{d-button label="admin.user.anonymize" icon="exclamation-triangle" class="btn-danger" action=(action "anonymize")}} {{/if}} {{#if model.canBeDeleted}} {{d-button label="admin.user.delete" icon="exclamation-triangle" class="btn-danger" action=(action "destroy")}} {{/if}}
{{#if deleteExplanation}}

{{d-icon "exclamation-triangle"}} {{deleteExplanation}}
{{/if}}