aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dfrn_request.php
diff options
context:
space:
mode:
authorVasudev Kamath <kamathvasudev@gmail.com>2012-06-23 08:11:35 +0530
committerVasudev Kamath <kamathvasudev@gmail.com>2012-06-23 08:11:35 +0530
commit6e4760dd9c512147309b5e4a98d25216610f81da (patch)
treecd1ea2edf6b257e52ab8fd10c781ba600d884506 /mod/dfrn_request.php
parent11974b4d948ae5d9b9fb53970838463bd88bb9f6 (diff)
parent4e7eb36dd1e65bf481ffe30614565674cbef4fe5 (diff)
downloadvolse-hubzilla-6e4760dd9c512147309b5e4a98d25216610f81da.tar.gz
volse-hubzilla-6e4760dd9c512147309b5e4a98d25216610f81da.tar.bz2
volse-hubzilla-6e4760dd9c512147309b5e4a98d25216610f81da.zip
Merge branch 'master' of git://github.com/friendica/friendica
Diffstat (limited to 'mod/dfrn_request.php')
-rw-r--r--mod/dfrn_request.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php
index 896fe1792..cec2d7f8b 100644
--- a/mod/dfrn_request.php
+++ b/mod/dfrn_request.php
@@ -170,6 +170,21 @@ function dfrn_request_post(&$a) {
info( t("Introduction complete.") . EOL);
}
+ $r = q("select id from contact where uid = %d and url = '%s' and `site-pubkey` = '%s' limit 1",
+ intval(local_user()),
+ dbesc($dfrn_url),
+ $parms['key'] // this was already escaped
+ );
+ if(count($r)) {
+ $g = q("select def_gid from user where uid = %d limit 1",
+ intval(local_user())
+ );
+ if($g && intval($g[0]['def_gid'])) {
+ require_once('include/group.php');
+ group_add_member(local_user(),'',$r[0]['id'],$g[0]['def_gid']);
+ }
+ }
+
/**
* Allow the blocked remote notification to complete
*/