aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/network.php b/include/network.php
index 77c1550ba..5ca60b5fe 100644
--- a/include/network.php
+++ b/include/network.php
@@ -896,11 +896,13 @@ function discover_by_url($url,$arr = null) {
if($item) {
$author = $item->get_author();
if($author) {
- $name = trim(unxmlify($author->get_name()));
- if(! $name)
- $name = trim(unxmlify($author->get_email()));
- if(strpos($name,'@') !== false)
- $name = substr($name,0,strpos($name,'@'));
+ if(! $name) {
+ $name = trim(unxmlify($author->get_name()));
+ if(! $name)
+ $name = trim(unxmlify($author->get_email()));
+ if(strpos($name,'@') !== false)
+ $name = substr($name,0,strpos($name,'@'));
+ }
if(! $profile && $author->get_link())
$profile = trim(unxmlify($author->get_link()));
}