+ $hash = random_string() . (string) time(); // Generate a confirm_key
+
+ if(is_array($contact_record)) {
+ $ret = q("INSERT INTO `intro` ( `uid`, `contact-id`, `blocked`, `knowyou`, `note`, `hash`, `datetime`)
+ VALUES ( %d, %d, 1, %d, '%s', '%s', '%s' )",
+ intval($uid),
+ intval($contact_record['id']),
+ ((x($_POST,'knowyou') && ($_POST['knowyou'] == 1)) ? 1 : 0),
+ dbesc(notags(trim($_POST['dfrn-request-message']))),
+ dbesc($hash),
+ dbesc(datetime_convert())
+ );
+ }
+
+ // This notice will only be seen by the requestor if the requestor and requestee are on the same server.