4 * @file mod/dfrn_request.php
5 * @brief Module: dfrn_request
7 * Purpose: Handles communication associated with the issuance of
10 * @see PDF with dfrn specs: https://github.com/friendica/friendica/blob/master/spec/dfrn2.pdf
11 * You also find a graphic which describes the confirmation process at
12 * https://github.com/friendica/friendica/blob/master/spec/dfrn2_contact_request.png
15 require_once('include/enotify.php');
16 require_once('include/Scrape.php');
17 require_once('include/Probe.php');
18 require_once('include/group.php');
20 function dfrn_request_init(&$a) {
25 profile_load($a,$which);
31 * Function: dfrn_request_post
34 * Handles multiple scenarios.
37 * Clicking 'submit' on a friend request page.
40 * Following Scenario 1, we are brought back to our home site
41 * in order to link our friend request with our own server cell.
42 * After logging in, we click 'submit' to approve the linkage.
45 function dfrn_request_post(&$a) {
47 if(($a->argc != 2) || (! count($a->profile))) {
48 logger('Wrong count of argc or profiles: argc=' . $a->argc . ',profile()=' . count($a->profile));
53 if(x($_POST, 'cancel')) {
60 * Scenario 2: We've introduced ourself to another cell, then have been returned to our own cell
61 * to confirm the request, and then we've clicked submit (perhaps after logging in).
62 * That brings us here:
66 if((x($_POST,'localconfirm')) && ($_POST['localconfirm'] == 1)) {
69 * Ensure this is a valid request
72 if(local_user() && ($a->user['nickname'] == $a->argv[1]) && (x($_POST,'dfrn_url'))) {
75 $dfrn_url = notags(trim($_POST['dfrn_url']));
76 $aes_allow = (((x($_POST,'aes_allow')) && ($_POST['aes_allow'] == 1)) ? 1 : 0);
77 $confirm_key = ((x($_POST,'confirm_key')) ? $_POST['confirm_key'] : "");
78 $hidden = ((x($_POST,'hidden-contact')) ? intval($_POST['hidden-contact']) : 0);
79 $contact_record = null;
86 * Lookup the contact based on their URL (which is the only unique thing we have at the moment)
89 $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' AND NOT `self` LIMIT 1",
91 dbesc(normalise_link($dfrn_url))
94 if (dbm::is_result($r)) {
95 if(strlen($r[0]['dfrn-id'])) {
98 * We don't need to be here. It has already happened.
101 notice( t("This introduction has already been accepted.") . EOL );
105 $contact_record = $r[0];
108 if(is_array($contact_record)) {
109 $r = q("UPDATE `contact` SET `ret-aes` = %d, hidden = %d WHERE `id` = %d",
112 intval($contact_record['id'])
118 * Scrape the other site's profile page to pick up the dfrn links, key, fn, and photo
121 $parms = Probe::profile($dfrn_url);
123 if(! count($parms)) {
124 notice( t('Profile location is not valid or does not contain profile information.') . EOL );
129 notice( t('Warning: profile location has no identifiable owner name.') . EOL );
130 if(! x($parms,'photo'))
131 notice( t('Warning: profile location has no profile photo.') . EOL );
132 $invalid = Probe::valid_dfrn($parms);
134 notice( sprintf( tt("%d required parameter was not found at the given location",
135 "%d required parameters were not found at the given location",
136 $invalid), $invalid) . EOL );
141 $dfrn_request = $parms['dfrn-request'];
143 $photo = $parms["photo"];
145 // Escape the entire array
151 * Create a contact record on our site for the other person
154 $r = q("INSERT INTO `contact` ( `uid`, `created`,`url`, `nurl`, `addr`, `name`, `nick`, `photo`, `site-pubkey`,
155 `request`, `confirm`, `notify`, `poll`, `poco`, `network`, `aes_allow`, `hidden`, `blocked`, `pending`)
156 VALUES ( %d, '%s', '%s', '%s', '%s', '%s' , '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d)",
157 intval(local_user()),
160 dbesc(normalise_link($dfrn_url)),
166 $parms['dfrn-request'],
167 $parms['dfrn-confirm'],
168 $parms['dfrn-notify'],
180 info( t("Introduction complete.") . EOL);
183 $r = q("SELECT `id`, `network` FROM `contact` WHERE `uid` = %d AND `url` = '%s' AND `site-pubkey` = '%s' LIMIT 1",
184 intval(local_user()),
186 $parms['key'] // this was already escaped
188 if (dbm::is_result($r)) {
189 $def_gid = get_default_group(local_user(), $r[0]["network"]);
191 group_add_member(local_user(), '', $r[0]['id'], $def_gid);
194 update_contact_avatar($photo, local_user(), $r[0]["id"], true);
196 $forwardurl = App::get_baseurl()."/contacts/".$r[0]['id'];
198 $forwardurl = App::get_baseurl()."/contacts";
201 * Allow the blocked remote notification to complete
204 if(is_array($contact_record))
205 $dfrn_request = $contact_record['request'];
207 if(strlen($dfrn_request) && strlen($confirm_key))
208 $s = fetch_url($dfrn_request . '?confirm_key=' . $confirm_key);
210 // (ignore reply, nothing we can do it failed)
212 // Old: goaway(zrl($dfrn_url));
214 return; // NOTREACHED
220 // invalid/bogus request
222 notice( t('Unrecoverable protocol error.') . EOL );
224 return; // NOTREACHED
231 * We are the requestee. A person from a remote cell has made an introduction
232 * on our profile web page and clicked submit. We will use their DFRN-URL to
233 * figure out how to contact their cell.
235 * Scrape the originating DFRN-URL for everything we need. Create a contact record
236 * and an introduction to show our user next time he/she logs in.
237 * Finally redirect back to the requestor so that their site can record the request.
238 * If our user (the requestee) later confirms this request, a record of it will need
239 * to exist on the requestor's cell in order for the confirmation process to complete..
241 * It's possible that neither the requestor or the requestee are logged in at the moment,
242 * and the requestor does not yet have any credentials to the requestee profile.
244 * Who is the requestee? We've already loaded their profile which means their nickname should be
245 * in $a->argv[1] and we should have their complete info in $a->profile.
249 if(! (is_array($a->profile) && count($a->profile))) {
250 notice( t('Profile unavailable.') . EOL);
254 $nickname = $a->profile['nickname'];
255 $notify_flags = $a->profile['notify-flags'];
256 $uid = $a->profile['uid'];
257 $maxreq = intval($a->profile['maxreq']);
258 $contact_record = null;
265 if( x($_POST,'dfrn_url')) {
268 * Block friend request spam
272 $r = q("SELECT * FROM `intro` WHERE `datetime` > '%s' AND `uid` = %d",
273 dbesc(datetime_convert('UTC','UTC','now - 24 hours')),
276 if (dbm::is_result($r) && count($r) > $maxreq) {
277 notice( sprintf( t('%s has received too many connection requests today.'), $a->profile['name']) . EOL);
278 notice( t('Spam protection measures have been invoked.') . EOL);
279 notice( t('Friends are advised to please try again in 24 hours.') . EOL);
286 * Cleanup old introductions that remain blocked.
287 * Also remove the contact record, but only if there is no existing relationship
288 * Do not remove email contacts as these may be awaiting email verification
291 $r = q("SELECT `intro`.*, `intro`.`id` AS `iid`, `contact`.`id` AS `cid`, `contact`.`rel`
292 FROM `intro` LEFT JOIN `contact` on `intro`.`contact-id` = `contact`.`id`
293 WHERE `intro`.`blocked` = 1 AND `contact`.`self` = 0
294 AND `contact`.`network` != '%s'
295 AND `intro`.`datetime` < UTC_TIMESTAMP() - INTERVAL 30 MINUTE ",
298 if (dbm::is_result($r)) {
301 q("DELETE FROM `contact` WHERE `id` = %d",
305 q("DELETE FROM `intro` WHERE `id` = %d",
313 * Cleanup any old email intros - which will have a greater lifetime
316 $r = q("SELECT `intro`.*, `intro`.`id` AS `iid`, `contact`.`id` AS `cid`, `contact`.`rel`
317 FROM `intro` LEFT JOIN `contact` on `intro`.`contact-id` = `contact`.`id`
318 WHERE `intro`.`blocked` = 1 AND `contact`.`self` = 0
319 AND `contact`.`network` = '%s'
320 AND `intro`.`datetime` < UTC_TIMESTAMP() - INTERVAL 3 DAY ",
323 if (dbm::is_result($r)) {
326 q("DELETE FROM `contact` WHERE `id` = %d",
330 q("DELETE FROM `intro` WHERE `id` = %d",
336 $email_follow = (x($_POST,'email_follow') ? intval($_POST['email_follow']) : 0);
337 $real_name = (x($_POST,'realname') ? notags(trim($_POST['realname'])) : '');
339 $url = trim($_POST['dfrn_url']);
341 notice( t("Invalid locator") . EOL );
349 if(! validate_email($url)) {
350 notice( t('Invalid email address.') . EOL);
355 $name = ($realname) ? $realname : $addr;
356 $nick = substr($addr,0,strpos($addr,'@'));
357 $url = 'http://' . substr($addr,strpos($addr,'@') + 1);
358 $nurl = normalise_url($host);
359 $poll = 'email ' . random_string();
360 $notify = 'smtp ' . random_string();
361 $network = NETWORK_MAIL2;
362 $rel = CONTACT_IS_FOLLOWER;
364 $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
365 if(get_config('system','dfrn_only'))
368 if(! $mail_disabled) {
370 $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
374 if (! dbm::is_result($r)) {
375 notice( t('This account has not been configured for email. Request failed.') . EOL);
380 $r = q("insert into contact ( uid, created, addr, name, nick, url, nurl, poll, notify, blocked, pending, network, rel )
381 values( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d ) ",
383 dbesc(datetime_convert()),
397 $r = q("SELECT `id`, `network` FROM `contact` WHERE `poll` = '%s' AND `uid` = %d LIMIT 1",
401 if (dbm::is_result($r)) {
402 $contact_id = $r[0]['id'];
404 $def_gid = get_default_group($uid, $r[0]["network"]);
405 if (intval($def_gid))
406 group_add_member($uid, '', $contact_id, $def_gid);
408 $photo = avatar_img($addr);
410 $r = q("UPDATE `contact` SET
416 `avatar-date` = '%s',
423 dbesc(datetime_convert()),
424 dbesc(datetime_convert()),
425 dbesc(datetime_convert()),
430 // contact is created. Now create an introduction
432 $hash = random_string();
434 $r = q("INSERT INTO `intro` ( `uid`, `contact-id`, knowyou, note, hash, datetime, blocked )
435 VALUES( %d , %d, %d, '%s', '%s', '%s', %d ) ",
438 ((x($_POST,'knowyou') && ($_POST['knowyou'] == 1)) ? 1 : 0),
439 dbesc(notags(trim($_POST['dfrn-request-message']))),
441 dbesc(datetime_convert()),
445 // Next send an email verify form to the requestor.
448 // Detect the network
449 $data = probe_url($url);
450 $network = $data["network"];
452 // Canonicalise email-style profile locator
453 $url = Probe::webfinger_dfrn($url,$hcard);
455 if (substr($url,0,5) === 'stat:') {
457 // Every time we detect the remote subscription we define this as OStatus.
458 // We do this even if it is not OStatus.
459 // we only need to pass this through another section of the code.
460 if ($network != NETWORK_DIASPORA)
461 $network = NETWORK_OSTATUS;
463 $url = substr($url,5);
465 $network = NETWORK_DFRN;
468 logger('dfrn_request: url: ' . $url . ',network=' . $network, LOGGER_DEBUG);
470 if($network === NETWORK_DFRN) {
471 $ret = q("SELECT * FROM `contact` WHERE `uid` = %d AND `url` = '%s' AND `self` = 0 LIMIT 1",
476 if (dbm::is_result($ret)) {
477 if(strlen($ret[0]['issued-id'])) {
478 notice( t('You have already introduced yourself here.') . EOL );
481 elseif($ret[0]['rel'] == CONTACT_IS_FRIEND) {
482 notice( sprintf( t('Apparently you are already friends with %s.'), $a->profile['name']) . EOL);
486 $contact_record = $ret[0];
487 $parms = array('dfrn-request' => $ret[0]['request']);
491 $issued_id = random_string();
493 if(is_array($contact_record)) {
494 // There is a contact record but no issued-id, so this
495 // is a reciprocal introduction from a known contact
496 $r = q("UPDATE `contact` SET `issued-id` = '%s' WHERE `id` = %d",
498 intval($contact_record['id'])
502 if(! validate_url($url)) {
503 notice( t('Invalid profile URL.') . EOL);
504 goaway(App::get_baseurl() . '/' . $a->cmd);
505 return; // NOTREACHED
508 if(! allowed_url($url)) {
509 notice( t('Disallowed profile URL.') . EOL);
510 goaway(App::get_baseurl() . '/' . $a->cmd);
511 return; // NOTREACHED
515 require_once('include/Scrape.php');
517 $parms = Probe::profile(($hcard) ? $hcard : $url);
519 if(! count($parms)) {
520 notice( t('Profile location is not valid or does not contain profile information.') . EOL );
521 goaway(App::get_baseurl() . '/' . $a->cmd);
525 notice( t('Warning: profile location has no identifiable owner name.') . EOL );
526 if(! x($parms,'photo'))
527 notice( t('Warning: profile location has no profile photo.') . EOL );
528 $invalid = Probe::valid_dfrn($parms);
530 notice( sprintf( tt("%d required parameter was not found at the given location",
531 "%d required parameters were not found at the given location",
532 $invalid), $invalid) . EOL );
539 $parms['url'] = $url;
540 $parms['issued-id'] = $issued_id;
541 $photo = $parms["photo"];
544 $r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `nurl`, `addr`, `name`, `nick`, `issued-id`, `photo`, `site-pubkey`,
545 `request`, `confirm`, `notify`, `poll`, `poco`, `network`, `blocked`, `pending` )
546 VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d )",
548 dbesc(datetime_convert()),
550 dbesc(normalise_link($url)),
557 $parms['dfrn-request'],
558 $parms['dfrn-confirm'],
559 $parms['dfrn-notify'],
567 // find the contact record we just created
569 $r = q("SELECT `id` FROM `contact`
570 WHERE `uid` = %d AND `url` = '%s' AND `issued-id` = '%s' LIMIT 1",
575 if (dbm::is_result($r)) {
576 $contact_record = $r[0];
577 update_contact_avatar($photo, $uid, $contact_record["id"], true);
583 notice( t('Failed to update contact record.') . EOL );
587 $hash = random_string() . (string) time(); // Generate a confirm_key
589 if(is_array($contact_record)) {
590 $ret = q("INSERT INTO `intro` ( `uid`, `contact-id`, `blocked`, `knowyou`, `note`, `hash`, `datetime`)
591 VALUES ( %d, %d, 1, %d, '%s', '%s', '%s' )",
593 intval($contact_record['id']),
594 ((x($_POST,'knowyou') && ($_POST['knowyou'] == 1)) ? 1 : 0),
595 dbesc(notags(trim($_POST['dfrn-request-message']))),
597 dbesc(datetime_convert())
601 // This notice will only be seen by the requestor if the requestor and requestee are on the same server.
604 info( t('Your introduction has been sent.') . EOL );
606 // "Homecoming" - send the requestor back to their site to record the introduction.
608 $dfrn_url = bin2hex(App::get_baseurl() . '/profile/' . $nickname);
609 $aes_allow = ((function_exists('openssl_encrypt')) ? 1 : 0);
611 goaway($parms['dfrn-request'] . "?dfrn_url=$dfrn_url"
612 . '&dfrn_version=' . DFRN_PROTOCOL_VERSION
613 . '&confirm_key=' . $hash
614 . (($aes_allow) ? "&aes_allow=1" : "")
617 // END $network === NETWORK_DFRN
618 } elseif (($network != NETWORK_PHANTOM) AND ($url != "")) {
622 * Substitute our user's feed URL into $url template
623 * Send the subscriber home to subscribe
627 // Diaspora needs the uri in the format user@domain.tld
628 // Diaspora will support the remote subscription in a future version
629 if ($network == NETWORK_DIASPORA) {
630 $uri = $nickname.'@'.$a->get_hostname();
633 $uri .= '/'.$a->get_path();
635 $uri = urlencode($uri);
637 $uri = App::get_baseurl().'/profile/'.$nickname;
639 $url = str_replace('{uri}', $uri, $url);
642 // END $network != NETWORK_PHANTOM
644 notice(t("Remote subscription can't be done for your network. Please subscribe directly on your system.").EOL);
652 function dfrn_request_content(&$a) {
654 if(($a->argc != 2) || (! count($a->profile)))
658 // "Homecoming". Make sure we're logged in to this site as the correct user. Then offer a confirm button
659 // to send us to the post section to record the introduction.
661 if(x($_GET,'dfrn_url')) {
664 info( t("Please login to confirm introduction.") . EOL );
665 /* setup the return URL to come back to this page if they use openid */
666 $_SESSION['return_url'] = $a->query_string;
670 // Edge case, but can easily happen in the wild. This person is authenticated,
671 // but not as the person who needs to deal with this request.
673 if ($a->user['nickname'] != $a->argv[1]) {
674 notice( t("Incorrect identity currently logged in. Please login to <strong>this</strong> profile.") . EOL);
678 $dfrn_url = notags(trim(hex2bin($_GET['dfrn_url'])));
679 $aes_allow = (((x($_GET,'aes_allow')) && ($_GET['aes_allow'] == 1)) ? 1 : 0);
680 $confirm_key = (x($_GET,'confirm_key') ? $_GET['confirm_key'] : "");
682 // Checking fastlane for validity
683 if (x($_SESSION, "fastlane") AND (normalise_link($_SESSION["fastlane"]) == normalise_link($dfrn_url))) {
684 $_POST["dfrn_url"] = $dfrn_url;
685 $_POST["confirm_key"] = $confirm_key;
686 $_POST["localconfirm"] = 1;
687 $_POST["hidden-contact"] = 0;
688 $_POST["submit"] = t('Confirm');
690 dfrn_request_post($a);
693 return; // NOTREACHED
696 $tpl = get_markup_template("dfrn_req_confirm.tpl");
697 $o = replace_macros($tpl,array(
698 '$dfrn_url' => $dfrn_url,
699 '$aes_allow' => (($aes_allow) ? '<input type="hidden" name="aes_allow" value="1" />' : "" ),
700 '$hidethem' => t('Hide this contact'),
701 '$hidechecked' => '',
702 '$confirm_key' => $confirm_key,
703 '$welcome' => sprintf( t('Welcome home %s.'), $a->user['username']),
704 '$please' => sprintf( t('Please confirm your introduction/connection request to %s.'), $dfrn_url),
705 '$submit' => t('Confirm'),
706 '$uid' => $_SESSION['uid'],
707 '$nickname' => $a->user['nickname'],
708 'dfrn_rawurl' => $_GET['dfrn_url']
713 elseif((x($_GET,'confirm_key')) && strlen($_GET['confirm_key'])) {
715 // we are the requestee and it is now safe to send our user their introduction,
716 // We could just unblock it, but first we have to jump through a few hoops to
717 // send an email, or even to find out if we need to send an email.
719 $intro = q("SELECT * FROM `intro` WHERE `hash` = '%s' LIMIT 1",
720 dbesc($_GET['confirm_key'])
723 if (dbm::is_result($intro)) {
725 $r = q("SELECT `contact`.*, `user`.* FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid`
726 WHERE `contact`.`id` = %d LIMIT 1",
727 intval($intro[0]['contact-id'])
730 $auto_confirm = false;
732 if (dbm::is_result($r)) {
733 if(($r[0]['page-flags'] != PAGE_NORMAL) && ($r[0]['page-flags'] != PAGE_PRVGROUP))
734 $auto_confirm = true;
736 if(! $auto_confirm) {
739 'type' => NOTIFY_INTRO,
740 'notify_flags' => $r[0]['notify-flags'],
741 'language' => $r[0]['language'],
742 'to_name' => $r[0]['username'],
743 'to_email' => $r[0]['email'],
744 'uid' => $r[0]['uid'],
745 'link' => App::get_baseurl() . '/notifications/intros',
746 'source_name' => ((strlen(stripslashes($r[0]['name']))) ? stripslashes($r[0]['name']) : t('[Name Withheld]')),
747 'source_link' => $r[0]['url'],
748 'source_photo' => $r[0]['photo'],
749 'verb' => ACTIVITY_REQ_FRIEND,
755 require_once('mod/dfrn_confirm.php');
757 'uid' => $r[0]['uid'],
758 'node' => $r[0]['nickname'],
759 'dfrn_id' => $r[0]['issued-id'],
760 'intro_id' => $intro[0]['id'],
761 'duplex' => (($r[0]['page-flags'] == PAGE_FREELOVE) ? 1 : 0),
762 'activity' => intval(get_pconfig($r[0]['uid'],'system','post_newfriend'))
764 dfrn_confirm_post($a,$handsfree);
769 if(! $auto_confirm) {
771 // If we are auto_confirming, this record will have already been nuked
772 // in dfrn_confirm_post()
774 $r = q("UPDATE `intro` SET `blocked` = 0 WHERE `hash` = '%s'",
775 dbesc($_GET['confirm_key'])
781 return; // NOTREACHED
786 * Normal web request. Display our user's introduction form.
789 if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
790 if(! get_config('system','local_block')) {
791 notice( t('Public access denied.') . EOL);
798 * Try to auto-fill the profile address
801 // At first look if an address was provided
802 // Otherwise take the local address
803 if (x($_GET,'addr') AND ($_GET['addr'] != ""))
804 $myaddr = hex2bin($_GET['addr']);
805 elseif (x($_GET,'address') AND ($_GET['address'] != ""))
806 $myaddr = $_GET['address'];
807 elseif(local_user()) {
808 if(strlen($a->path)) {
809 $myaddr = App::get_baseurl() . '/profile/' . $a->user['nickname'];
812 $myaddr = $a->user['nickname'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3 );
814 } else // last, try a zrl
815 $myaddr = get_my_url();
817 $target_addr = $a->profile['nickname'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3 );
822 * The auto_request form only has the profile address
823 * because nobody is going to read the comments and
824 * it doesn't matter if they know you or not.
828 if($a->profile['page-flags'] == PAGE_NORMAL)
829 $tpl = get_markup_template('dfrn_request.tpl');
831 $tpl = get_markup_template('auto_request.tpl');
833 $page_desc = t("Please enter your 'Identity Address' from one of the following supported communications networks:");
835 // see if we are allowed to have NETWORK_MAIL2 contacts
837 $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
838 if(get_config('system','dfrn_only'))
841 if(! $mail_disabled) {
842 $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
843 intval($a->profile['uid'])
845 if (! dbm::is_result($r)) {
850 // "coming soon" is disabled for now
851 //$emailnet = (($mail_disabled) ? '' : t("<strike>Connect as an email follower</strike> \x28Coming soon\x29"));
854 $invite_desc = sprintf(
855 t('If you are not yet a member of the free social web, <a href="%s/siteinfo">follow this link to find a public Friendica site and join us today</a>.'),
859 $o = replace_macros($tpl,array(
860 '$header' => t('Friend/Connection Request'),
861 '$desc' => t('Examples: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, testuser@identi.ca'),
862 '$pls_answer' => t('Please answer the following:'),
863 '$does_know_you' => array('knowyou', sprintf(t('Does %s know you?'),$a->profile['name']), false, '', array(t('No'),t('Yes'))),
864 /*'$does_know' => sprintf( t('Does %s know you?'),$a->profile['name']),
867 '$add_note' => t('Add a personal note:'),
868 '$page_desc' => $page_desc,
869 '$friendica' => t('Friendica'),
870 '$statusnet' => t('StatusNet/Federated Social Web'),
871 '$diaspora' => t('Diaspora'),
872 '$diasnote' => sprintf (t(' - please do not use this form. Instead, enter %s into your Diaspora search bar.'),$target_addr),
873 '$your_address' => t('Your Identity Address:'),
874 '$invite_desc' => $invite_desc,
875 '$emailnet' => $emailnet,
876 '$submit' => t('Submit Request'),
877 '$cancel' => t('Cancel'),
878 '$nickname' => $a->argv[1],
879 '$name' => $a->profile['name'],
885 return; // Somebody is fishing.