custer fixed error in user id with email

This commit is contained in:
asus
2024-04-30 18:22:56 +02:00
parent d402e9a7e3
commit 0d20d71a7e
6 changed files with 650 additions and 7 deletions

View File

@@ -52,10 +52,6 @@ function format_user_info($query, $user_id, $if_empty = '') {
$output_date_format = Custer::USER_INFO_DATE_FORMAT;
$special_queries = Custer::QUERIES;
$current_user = get_user_by('id', $user_id);
if (empty($current_user)) {
return;
}
$is_acf = false;
@@ -71,6 +67,15 @@ function format_user_info($query, $user_id, $if_empty = '') {
}
/*
* for the rest, we need the user
*
*/
$current_user = get_user_by('id', $user_id);
if (empty($current_user)) {
return null;
}
/*
* check if it's an acf field