check if user is available

This commit is contained in:
Matthias Pfefferle 2023-11-21 14:57:44 +01:00
parent d226564325
commit 60148a3b65
1 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,10 @@ class Webfinger {
public static function add_user_discovery( $array, $resource, $user ) {
$user = User_Collection::get_by_id( $user->ID );
if ( ! $user || is_wp_error( $user ) ) {
return $array;
}
$array['links'][] = array(
'rel' => 'self',
'type' => 'application/activity+json',