aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorSimon L'nu <simon.lnu@gmail.com>2012-04-23 18:25:14 -0400
committerSimon L'nu <simon.lnu@gmail.com>2012-04-23 18:25:14 -0400
commit6e9485605f64394f8e6d830b8a959a5afc85cf2d (patch)
tree7f94f8d1e2336bbb7e69a327a003b6880f0610c0 /mod
parent29d7f260d7e6dc178862c6a6c16445ef9b3512e4 (diff)
parentaf7abcea2715824cbd6460a7323c8bb64bd5b829 (diff)
downloadvolse-hubzilla-6e9485605f64394f8e6d830b8a959a5afc85cf2d.tar.gz
volse-hubzilla-6e9485605f64394f8e6d830b8a959a5afc85cf2d.tar.bz2
volse-hubzilla-6e9485605f64394f8e6d830b8a959a5afc85cf2d.zip
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master: DE strings, correction of a typo diabok-themes: fixed bug in green-wide and dark-wide diabook-themes: small fix in nets_aside, group_aside and delete obsolete .tpls in subfolders diabook-themes: bugfix in admin-section allow bbcode representation of html symbols such as &copy; by wrapping in bb brackets protect jappixmini/proxy from typo check, more work on email2 connector * master:
Diffstat (limited to 'mod')
-rw-r--r--mod/dfrn_request.php50
1 files changed, 49 insertions, 1 deletions
diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php
index 77a3124f7..74d25adbf 100644
--- a/mod/dfrn_request.php
+++ b/mod/dfrn_request.php
@@ -314,7 +314,7 @@ function dfrn_request_post(&$a) {
if($email_follow) {
- if(! strpos($url,'@')) {
+ if(! validate_email($url)) {
notice( t('Invalid email address.') . EOL);
return;
}
@@ -346,11 +346,59 @@ function dfrn_request_post(&$a) {
}
}
+ $r = q("insert into contact ( uid, created, addr, name, nick, url, nurl, poll, notify, blocked, pending, network, rel )
+ values( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d ) ",
+ intval($uid),
+ dbesc(datetime_convert()),
+ dbesc($addr),
+ dbesc($name),
+ dbesc($nick),
+ dbesc($url),
+ dbesc($nurl),
+ dbesc($poll),
+ dbesc($notify),
+ intval($blocked),
+ intval($pending),
+ dbesc($network),
+ intval($rel)
+ );
+
+ $r = q("select id from contact where poll = '%s' and uid = %d limit 1",
+ dbesc($poll),
+ intval($uid)
+ );
+ if(count($r)) {
+ $contact_id = $r[0]['id'];
+
+ $photo = avatar_img($addr);
+
+ $r = q("UPDATE `contact` SET
+ `photo` = '%s',
+ `thumb` = '%s',
+ `micro` = '%s',
+ `name-date` = '%s',
+ `uri-date` = '%s',
+ `avatar-date` = '%s',
+ `hidden` = 0,
+ WHERE `id` = %d LIMIT 1
+ ",
+ dbesc($photos[0]),
+ dbesc($photos[1]),
+ dbesc($photos[2]),
+ dbesc(datetime_convert()),
+ dbesc(datetime_convert()),
+ dbesc(datetime_convert()),
+ intval($contact_id)
+ );
+ }
+ // contact is created. Now send an email verify form to the requestor.
+ //
}
+
else {
// Canonicalise email-style profile locator