aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-06-12 01:13:09 -0700
committerfriendica <info@friendica.com>2012-06-12 01:13:09 -0700
commit8eb81a99c6b032436ae397a65a7ca52c576965be (patch)
tree615fcd24a19ed57b480b7819a8a5ea26601a7310 /mod
parentc53e1112d55b45a3320b151bcc56b9d2340082d7 (diff)
downloadvolse-hubzilla-8eb81a99c6b032436ae397a65a7ca52c576965be.tar.gz
volse-hubzilla-8eb81a99c6b032436ae397a65a7ca52c576965be.tar.bz2
volse-hubzilla-8eb81a99c6b032436ae397a65a7ca52c576965be.zip
fix default group for local follows
Diffstat (limited to 'mod')
-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..864fb375d 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
*/