]> git.mxchange.org Git - friendica.git/blobdiff - mod/follow.php
A little more french translation.
[friendica.git] / mod / follow.php
index 763ffb1b01c456e436057d9cfe72f94324273974..28441eae8fbd589010019a86e3a637b56cd6332b 100644 (file)
@@ -117,6 +117,10 @@ function follow_post(&$a) {
                        $author = $feed->get_author();
                        if($author) {                   
                                $vcard['fn'] = unxmlify(trim($author->get_name()));
+                               if(! $vcard['fn'])
+                                       $vcard['fn'] = trim(unxmlify($author->get_email()));
+                               if(strpos($vcard['fn'],'@') !== false)
+                                       $vcard['fn'] = substr($vcard['fn'],0,strpos($vcard['fn'],'@'));
                                $vcard['nick'] = strtolower(notags(unxmlify($vcard['fn'])));
                                if(strpos($vcard['nick'],' '))
                                        $vcard['nick'] = trim(substr($vcard['nick'],0,strpos($vcard['nick'],' ')));