protected function get_user_uid($cauthor)
{
// if is guest author
if (is_object($cauthor) && isset($cauthor->type) && $cauthor->type == 'guest-author') {
// if have have a linked user account
global $coauthors_plus;
if (!$coauthors_plus->force_guest_authors && isset($cauthor->linked_account) && !empty($cauthor->linked_account)) {
return $cauthor->linked_account;
} else {
return null;
}
} else {
return $cauthor->id;
}
}