fix: 始终展示已认证标识
This commit is contained in:
1 parent
370ddc70d3
commit
06a03fd9cf
2 files changed
+13
-13
No files matched your search
+11
-12
@@ -140,19 +140,18 @@ class Home {
|
||||
|
||||
if (!empty($settings['verify']['enabled']) && !empty($settings['verify']['public_display']) && $this->is_user_verified($user_id, $settings['verify'])) {
|
||||
$info = class_exists('AKSRT\\User\\AuthApply') ? AuthApply::get_auth_info($user_id) : [];
|
||||
$type = sanitize_key((string) ($info['type'] ?? ''));
|
||||
$application = class_exists('AKSRT\\User\\AuthApply') ? AuthApply::get_apply_payload($user_id) : [];
|
||||
$type = sanitize_key((string) ($info['type'] ?? $application['type'] ?? ''));
|
||||
$type_settings = is_array($settings['verify']['types'][$type] ?? null) ? $settings['verify']['types'][$type] : [];
|
||||
if ($type_settings !== []) {
|
||||
$label = (string) $type_settings['badge_text'];
|
||||
$signals[] = [
|
||||
'type' => 'verify',
|
||||
'label' => $label,
|
||||
'title' => $label,
|
||||
'icon' => 'check-circle',
|
||||
'icon_url' => get_theme_file_uri('/assets/img/user/user-certification.svg'),
|
||||
'tone' => 'success',
|
||||
];
|
||||
}
|
||||
$label = (string) ($type_settings['badge_text'] ?? $type_settings['label'] ?? __('认证用户', 'aksrt'));
|
||||
$signals[] = [
|
||||
'type' => 'verify',
|
||||
'label' => $label,
|
||||
'title' => $label,
|
||||
'icon' => 'check-circle',
|
||||
'icon_url' => get_theme_file_uri('/assets/img/user/user-certification.svg'),
|
||||
'tone' => 'success',
|
||||
];
|
||||
}
|
||||
|
||||
if (!empty($settings['level']['enabled']) && !empty($settings['level']['public_display'])) {
|
||||
|
||||
Reference in new issue
Block a user