dbesc(datetime_convert('UTC','UTC','now - 24 hours')),
intval($uid)
);
- if(dbm::is_result($r) > $maxreq) {
+ if(dbm::is_result($r) && count($r) > $maxreq) {
notice( sprintf( t('%s has received too many connection requests today.'), $a->profile['name']) . EOL);
notice( t('Spam protection measures have been invoked.') . EOL);
notice( t('Friends are advised to please try again in 24 hours.') . EOL);
$r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
intval($uid)
);
- if(! dbm::is_result($r)) {
+ if(! dbm::is_result($r)) {
notice( t('This account has not been configured for email. Request failed.') . EOL);
return;
}
$hash = random_string();
- $r = q("insert into intro ( uid, `contact-id`, knowyou, note, hash, datetime, blocked )
- values( %d , %d, %d, '%s', '%s', '%s', %d ) ",
+ $r = q("INSERT INTO intro ( uid, `contact-id`, knowyou, note, hash, datetime, blocked )
+ VALUES( %d , %d, %d, '%s', '%s', '%s', %d ) ",
intval($uid),
intval($contact_id),
((x($_POST,'knowyou') && ($_POST['knowyou'] == 1)) ? 1 : 0),
$data = probe_url($url);
$network = $data["network"];
+ logger('dfrn_request: url=' . $url . ',network=' . $network . ',hcard=' . $hcard . ' - BEFORE!', LOGGER_DEBUG);
+
// Canonicalise email-style profile locator
$url = Probe::webfinger_dfrn($url,$hcard);
+ logger('dfrn_request: url=' . $url . ',network=' . $network . ',hcard=' . $hcard . ' - AFTER!', LOGGER_DEBUG);
+
if (substr($url,0,5) === 'stat:') {
// Every time we detect the remote subscription we define this as OStatus.
dbesc($url)
);
- if(count($ret)) {
+ if(dbm::is_result($ret)) {
if(strlen($ret[0]['issued-id'])) {
notice( t('You have already introduced yourself here.') . EOL );
return;
dbesc($_GET['confirm_key'])
);
- if(count($intro)) {
+ if(dbm::is_result($intro)) {
+
+ $auto_confirm = false;
$r = q("SELECT `contact`.*, `user`.* FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid`
WHERE `contact`.`id` = %d LIMIT 1",