+ ];
+
+ $return = true;
+
+ // Only create the entry if it doesn't exist yet
+ if (!DBA::exists('contact', ['uid' => $uid, 'self' => true])) {
+ $return = DBA::insert('contact', $contact);
+ }
+
+ // Create the public contact
+ if (!DBA::exists('contact', ['nurl' => $contact['nurl'], 'uid' => 0])) {
+ $contact['self'] = false;
+ $contact['uid'] = 0;
+ $contact['prvkey'] = null;
+
+ DBA::insert('contact', $contact, Database::INSERT_IGNORE);
+ }