fix(user-center): connect certification workflow
This commit is contained in:
1 parent
a7f3caec59
commit
d3bf75fbea
13 files changed
+97
-23
No files matched your search
@@ -189,6 +189,17 @@ trait UserControllerVerifyIntegrations {
|
||||
} elseif ($status === 'verified') {
|
||||
delete_user_meta($user_id, 'aksrt_user_verify_reason');
|
||||
}
|
||||
if ($status === 'verified') {
|
||||
$apply = get_user_meta($user_id, 'aksrt_user_verify_apply', true);
|
||||
if (is_array($apply)) {
|
||||
update_user_meta($user_id, 'aksrt_user_verify_info', [
|
||||
'name' => (string) ($apply['name'] ?? ''),
|
||||
'desc' => (string) ($apply['desc'] ?? ''),
|
||||
'type' => (string) ($apply['type'] ?? ''),
|
||||
'time' => current_time('Y-m-d H:i'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
$log = get_option('aksrt_verify_review_log', []);
|
||||
if (!is_array($log)) {
|
||||
@@ -219,6 +230,8 @@ trait UserControllerVerifyIntegrations {
|
||||
$reviewer = $reviewer_id > 0 ? get_userdata($reviewer_id) : null;
|
||||
$status = sanitize_key((string) ($row['verify_status'] ?? 'pending'));
|
||||
$email_verified = (bool) get_user_meta($user_id, 'aksrt_email_verified', true);
|
||||
$application = get_user_meta($user_id, 'aksrt_user_verify_apply', true);
|
||||
$application = is_array($application) ? $application : [];
|
||||
|
||||
return [
|
||||
'user_id' => $user_id,
|
||||
@@ -229,6 +242,7 @@ trait UserControllerVerifyIntegrations {
|
||||
'requested_at' => (string) ($row['user_registered'] ?? ''),
|
||||
'reviewed_at' => (string) ($row['reviewed_at'] ?? ''),
|
||||
'email_verified' => $email_verified,
|
||||
'application' => $application,
|
||||
'reviewer' => $this->build_admin_user_summary($reviewer_id, $reviewer),
|
||||
'history_count' => count($this->get_verify_history_for_user($user_id)),
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user