]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/foaf.php
invalid mbox_sha1sum in the case where users don't have an email address
[quix0rs-gnu-social.git] / actions / foaf.php
index 9cb65a885624a56e6b304e5e852ad8b7ef88f242..2f054de0c9f73885fafbb49e00e7808ca2cd9e29 100644 (file)
@@ -95,7 +95,9 @@ class FoafAction extends Action
         // Would be nice to tell if they were a Person or not (e.g. a #person usertag?)
         $this->elementStart('Agent', array('rdf:about' =>
                                              $this->user->uri));
-        $this->element('mbox_sha1sum', null, sha1('mailto:' . $this->user->email));
+        if ($this->user->email) {
+            $this->element('mbox_sha1sum', null, sha1('mailto:' . $this->user->email));
+        }
         if ($this->profile->fullname) {
             $this->element('name', null, $this->profile->fullname);
         }