added protection if user dont exists in format user
This commit is contained in:
@@ -53,6 +53,9 @@ function format_user_info($query, $user_id, $if_empty = '') {
|
||||
$special_queries = Custer::QUERIES;
|
||||
|
||||
$current_user = get_user_by('id', $user_id);
|
||||
if (empty($current_user)) {
|
||||
return;
|
||||
}
|
||||
$is_acf = false;
|
||||
|
||||
|
||||
@@ -75,8 +78,9 @@ function format_user_info($query, $user_id, $if_empty = '') {
|
||||
*/
|
||||
$acf_id = 'user_'.$user_id;
|
||||
$acf_object = get_field_object($query, $acf_id);
|
||||
if ($acf_object !== false)
|
||||
if ($acf_object !== false) {
|
||||
$is_acf = true;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user