aboutsummaryrefslogtreecommitdiffstats
path: root/mod/follow.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-02-16 20:25:10 -0800
committerFriendika <info@friendika.com>2011-02-16 20:25:10 -0800
commitc397a2f89bf3c2c609852f5bfc618c1d0cb0b709 (patch)
tree24d21b9352352a5594cb7bb80b8afd7f7fea2bc0 /mod/follow.php
parent67bb737aa1368e4b16de0ac42134db47874cc18c (diff)
downloadvolse-hubzilla-c397a2f89bf3c2c609852f5bfc618c1d0cb0b709.tar.gz
volse-hubzilla-c397a2f89bf3c2c609852f5bfc618c1d0cb0b709.tar.bz2
volse-hubzilla-c397a2f89bf3c2c609852f5bfc618c1d0cb0b709.zip
properly handle error returns in post w/ajax
Diffstat (limited to 'mod/follow.php')
-rw-r--r--mod/follow.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/mod/follow.php b/mod/follow.php
index 763ffb1b0..28441eae8 100644
--- a/mod/follow.php
+++ b/mod/follow.php
@@ -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'],' ')));