Merge pull request #302 from jeherve/fix/warning-webfinger-no-user
This commit is contained in:
commit
15adf639a8
1 changed files with 3 additions and 0 deletions
|
@ -23,6 +23,9 @@ class Webfinger {
|
|||
}
|
||||
|
||||
$user = \get_user_by( 'id', $user_id );
|
||||
if ( ! $user ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $user->user_login . '@' . \wp_parse_url( \home_url(), \PHP_URL_HOST );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue