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(App &$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(App &$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 );
128 if (! x($parms,'fn')) {
129 notice( t('Warning: profile location has no identifiable owner name.') . EOL );
131 if (! x($parms,'photo')) {
132 notice( t('Warning: profile location has no profile photo.') . EOL );
134 $invalid = Probe::valid_dfrn($parms);
136 notice( sprintf( tt("%d required parameter was not found at the given location",
137 "%d required parameters were not found at the given location",
138 $invalid), $invalid) . EOL );
143 $dfrn_request = $parms['dfrn-request'];
145 $photo = $parms["photo"];
147 // Escape the entire array
153 * Create a contact record on our site for the other person
156 $r = q("INSERT INTO `contact` ( `uid`, `created`,`url`, `nurl`, `addr`, `name`, `nick`, `photo`, `site-pubkey`,
157 `request`, `confirm`, `notify`, `poll`, `poco`, `network`, `aes_allow`, `hidden`, `blocked`, `pending`)
158 VALUES ( %d, '%s', '%s', '%s', '%s', '%s' , '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d)",
159 intval(local_user()),
162 dbesc(normalise_link($dfrn_url)),
168 $parms['dfrn-request'],
169 $parms['dfrn-confirm'],
170 $parms['dfrn-notify'],
182 info( t("Introduction complete.") . EOL);
185 $r = q("SELECT `id`, `network` FROM `contact` WHERE `uid` = %d AND `url` = '%s' AND `site-pubkey` = '%s' LIMIT 1",
186 intval(local_user()),
188 $parms['key'] // this was already escaped
190 if (dbm::is_result($r)) {
191 $def_gid = get_default_group(local_user(), $r[0]["network"]);
193 group_add_member(local_user(), '', $r[0]['id'], $def_gid);
196 update_contact_avatar($photo, local_user(), $r[0]["id"], true);
198 $forwardurl = App::get_baseurl()."/contacts/".$r[0]['id'];
200 $forwardurl = App::get_baseurl()."/contacts";
204 * Allow the blocked remote notification to complete
207 if (is_array($contact_record)) {
208 $dfrn_request = $contact_record['request'];
211 if (strlen($dfrn_request) && strlen($confirm_key)) {
212 $s = fetch_url($dfrn_request . '?confirm_key=' . $confirm_key);
215 // (ignore reply, nothing we can do it failed)
217 // Old: goaway(zrl($dfrn_url));
219 return; // NOTREACHED
225 // invalid/bogus request
227 notice( t('Unrecoverable protocol error.') . EOL );
229 return; // NOTREACHED
236 * We are the requestee. A person from a remote cell has made an introduction
237 * on our profile web page and clicked submit. We will use their DFRN-URL to
238 * figure out how to contact their cell.
240 * Scrape the originating DFRN-URL for everything we need. Create a contact record
241 * and an introduction to show our user next time he/she logs in.
242 * Finally redirect back to the requestor so that their site can record the request.
243 * If our user (the requestee) later confirms this request, a record of it will need
244 * to exist on the requestor's cell in order for the confirmation process to complete..
246 * It's possible that neither the requestor or the requestee are logged in at the moment,
247 * and the requestor does not yet have any credentials to the requestee profile.
249 * Who is the requestee? We've already loaded their profile which means their nickname should be
250 * in $a->argv[1] and we should have their complete info in $a->profile.
254 if(! (is_array($a->profile) && count($a->profile))) {
255 notice( t('Profile unavailable.') . EOL);
259 $nickname = $a->profile['nickname'];
260 $notify_flags = $a->profile['notify-flags'];
261 $uid = $a->profile['uid'];
262 $maxreq = intval($a->profile['maxreq']);
263 $contact_record = null;
270 if( x($_POST,'dfrn_url')) {
273 * Block friend request spam
277 $r = q("SELECT * FROM `intro` WHERE `datetime` > '%s' AND `uid` = %d",
278 dbesc(datetime_convert('UTC','UTC','now - 24 hours')),
281 if (dbm::is_result($r) && count($r) > $maxreq) {
282 notice( sprintf( t('%s has received too many connection requests today.'), $a->profile['name']) . EOL);
283 notice( t('Spam protection measures have been invoked.') . EOL);
284 notice( t('Friends are advised to please try again in 24 hours.') . EOL);
291 * Cleanup old introductions that remain blocked.
292 * Also remove the contact record, but only if there is no existing relationship
293 * Do not remove email contacts as these may be awaiting email verification
296 $r = q("SELECT `intro`.*, `intro`.`id` AS `iid`, `contact`.`id` AS `cid`, `contact`.`rel`
297 FROM `intro` LEFT JOIN `contact` on `intro`.`contact-id` = `contact`.`id`
298 WHERE `intro`.`blocked` = 1 AND `contact`.`self` = 0
299 AND `contact`.`network` != '%s'
300 AND `intro`.`datetime` < UTC_TIMESTAMP() - INTERVAL 30 MINUTE ",
303 if (dbm::is_result($r)) {
304 foreach ($r as $rr) {
306 q("DELETE FROM `contact` WHERE `id` = %d",
310 q("DELETE FROM `intro` WHERE `id` = %d",
318 * Cleanup any old email intros - which will have a greater lifetime
321 $r = q("SELECT `intro`.*, `intro`.`id` AS `iid`, `contact`.`id` AS `cid`, `contact`.`rel`
322 FROM `intro` LEFT JOIN `contact` on `intro`.`contact-id` = `contact`.`id`
323 WHERE `intro`.`blocked` = 1 AND `contact`.`self` = 0
324 AND `contact`.`network` = '%s'
325 AND `intro`.`datetime` < UTC_TIMESTAMP() - INTERVAL 3 DAY ",
328 if (dbm::is_result($r)) {
329 foreach ($r as $rr) {
331 q("DELETE FROM `contact` WHERE `id` = %d",
335 q("DELETE FROM `intro` WHERE `id` = %d",
341 $email_follow = (x($_POST,'email_follow') ? intval($_POST['email_follow']) : 0);
342 $real_name = (x($_POST,'realname') ? notags(trim($_POST['realname'])) : '');
344 $url = trim($_POST['dfrn_url']);
346 notice( t("Invalid locator") . EOL );
354 if(! validate_email($url)) {
355 notice( t('Invalid email address.') . EOL);
360 $name = ($realname) ? $realname : $addr;
361 $nick = substr($addr,0,strpos($addr,'@'));
362 $url = 'http://' . substr($addr,strpos($addr,'@') + 1);
363 $nurl = normalise_url($host);
364 $poll = 'email ' . random_string();
365 $notify = 'smtp ' . random_string();
366 $network = NETWORK_MAIL2;
367 $rel = CONTACT_IS_FOLLOWER;
369 $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
370 if(get_config('system','dfrn_only'))
373 if(! $mail_disabled) {
375 $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
379 if (! dbm::is_result($r)) {
380 notice( t('This account has not been configured for email. Request failed.') . EOL);
385 $r = q("insert into contact ( uid, created, addr, name, nick, url, nurl, poll, notify, blocked, pending, network, rel )
386 values( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d ) ",
388 dbesc(datetime_convert()),
402 $r = q("SELECT `id`, `network` FROM `contact` WHERE `poll` = '%s' AND `uid` = %d LIMIT 1",
406 if (dbm::is_result($r)) {
407 $contact_id = $r[0]['id'];
409 $def_gid = get_default_group($uid, $r[0]["network"]);
410 if (intval($def_gid))
411 group_add_member($uid, '', $contact_id, $def_gid);
413 $photo = avatar_img($addr);
415 $r = q("UPDATE `contact` SET
421 `avatar-date` = '%s',
428 dbesc(datetime_convert()),
429 dbesc(datetime_convert()),
430 dbesc(datetime_convert()),
435 // contact is created. Now create an introduction
437 $hash = random_string();
439 $r = q("INSERT INTO `intro` ( `uid`, `contact-id`, knowyou, note, hash, datetime, blocked )
440 VALUES( %d , %d, %d, '%s', '%s', '%s', %d ) ",
443 ((x($_POST,'knowyou') && ($_POST['knowyou'] == 1)) ? 1 : 0),
444 dbesc(notags(trim($_POST['dfrn-request-message']))),
446 dbesc(datetime_convert()),
450 // Next send an email verify form to the requestor.
453 // Detect the network
454 $data = probe_url($url);
455 $network = $data["network"];
457 // Canonicalise email-style profile locator
458 $url = Probe::webfinger_dfrn($url,$hcard);
460 if (substr($url,0,5) === 'stat:') {
462 // Every time we detect the remote subscription we define this as OStatus.
463 // We do this even if it is not OStatus.
464 // we only need to pass this through another section of the code.
465 if ($network != NETWORK_DIASPORA)
466 $network = NETWORK_OSTATUS;
468 $url = substr($url,5);
470 $network = NETWORK_DFRN;
473 logger('dfrn_request: url: ' . $url . ',network=' . $network, LOGGER_DEBUG);
475 if($network === NETWORK_DFRN) {
476 $ret = q("SELECT * FROM `contact` WHERE `uid` = %d AND `url` = '%s' AND `self` = 0 LIMIT 1",
481 if (dbm::is_result($ret)) {
482 if(strlen($ret[0]['issued-id'])) {
483 notice( t('You have already introduced yourself here.') . EOL );
486 elseif($ret[0]['rel'] == CONTACT_IS_FRIEND) {
487 notice( sprintf( t('Apparently you are already friends with %s.'), $a->profile['name']) . EOL);
491 $contact_record = $ret[0];
492 $parms = array('dfrn-request' => $ret[0]['request']);
496 $issued_id = random_string();
498 if(is_array($contact_record)) {
499 // There is a contact record but no issued-id, so this
500 // is a reciprocal introduction from a known contact
501 $r = q("UPDATE `contact` SET `issued-id` = '%s' WHERE `id` = %d",
503 intval($contact_record['id'])
507 if (! validate_url($url)) {
508 notice( t('Invalid profile URL.') . EOL);
509 goaway(App::get_baseurl() . '/' . $a->cmd);
510 return; // NOTREACHED
513 if (! allowed_url($url)) {
514 notice( t('Disallowed profile URL.') . EOL);
515 goaway(App::get_baseurl() . '/' . $a->cmd);
516 return; // NOTREACHED
520 require_once('include/Scrape.php');
522 $parms = Probe::profile(($hcard) ? $hcard : $url);
524 if (! count($parms)) {
525 notice( t('Profile location is not valid or does not contain profile information.') . EOL );
526 goaway(App::get_baseurl() . '/' . $a->cmd);
529 if (! x($parms,'fn')) {
530 notice( t('Warning: profile location has no identifiable owner name.') . EOL );
532 if (! x($parms,'photo')) {
533 notice( t('Warning: profile location has no profile photo.') . EOL );
535 $invalid = Probe::valid_dfrn($parms);
537 notice( sprintf( tt("%d required parameter was not found at the given location",
538 "%d required parameters were not found at the given location",
539 $invalid), $invalid) . EOL );
546 $parms['url'] = $url;
547 $parms['issued-id'] = $issued_id;
548 $photo = $parms["photo"];
551 $r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `nurl`, `addr`, `name`, `nick`, `issued-id`, `photo`, `site-pubkey`,
552 `request`, `confirm`, `notify`, `poll`, `poco`, `network`, `blocked`, `pending` )
553 VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d )",
555 dbesc(datetime_convert()),
557 dbesc(normalise_link($url)),
564 $parms['dfrn-request'],
565 $parms['dfrn-confirm'],
566 $parms['dfrn-notify'],
574 // find the contact record we just created
576 $r = q("SELECT `id` FROM `contact`
577 WHERE `uid` = %d AND `url` = '%s' AND `issued-id` = '%s' LIMIT 1",
582 if (dbm::is_result($r)) {
583 $contact_record = $r[0];
584 update_contact_avatar($photo, $uid, $contact_record["id"], true);
590 notice( t('Failed to update contact record.') . EOL );
594 $hash = random_string() . (string) time(); // Generate a confirm_key
596 if (is_array($contact_record)) {
597 $ret = q("INSERT INTO `intro` ( `uid`, `contact-id`, `blocked`, `knowyou`, `note`, `hash`, `datetime`)
598 VALUES ( %d, %d, 1, %d, '%s', '%s', '%s' )",
600 intval($contact_record['id']),
601 ((x($_POST,'knowyou') && ($_POST['knowyou'] == 1)) ? 1 : 0),
602 dbesc(notags(trim($_POST['dfrn-request-message']))),
604 dbesc(datetime_convert())
608 // This notice will only be seen by the requestor if the requestor and requestee are on the same server.
611 info( t('Your introduction has been sent.') . EOL );
614 // "Homecoming" - send the requestor back to their site to record the introduction.
616 $dfrn_url = bin2hex(App::get_baseurl() . '/profile/' . $nickname);
617 $aes_allow = ((function_exists('openssl_encrypt')) ? 1 : 0);
619 goaway($parms['dfrn-request'] . "?dfrn_url=$dfrn_url"
620 . '&dfrn_version=' . DFRN_PROTOCOL_VERSION
621 . '&confirm_key=' . $hash
622 . (($aes_allow) ? "&aes_allow=1" : "")
625 // END $network === NETWORK_DFRN
626 } elseif (($network != NETWORK_PHANTOM) AND ($url != "")) {
630 * Substitute our user's feed URL into $url template
631 * Send the subscriber home to subscribe
635 // Diaspora needs the uri in the format user@domain.tld
636 // Diaspora will support the remote subscription in a future version
637 if ($network == NETWORK_DIASPORA) {
638 $uri = $nickname.'@'.$a->get_hostname();
641 $uri .= '/'.$a->get_path();
643 $uri = urlencode($uri);
645 $uri = App::get_baseurl().'/profile/'.$nickname;
648 $url = str_replace('{uri}', $uri, $url);
651 // END $network != NETWORK_PHANTOM
653 notice(t("Remote subscription can't be done for your network. Please subscribe directly on your system.").EOL);
661 function dfrn_request_content(App &$a) {
663 if (($a->argc != 2) || (! count($a->profile))) {
668 // "Homecoming". Make sure we're logged in to this site as the correct user. Then offer a confirm button
669 // to send us to the post section to record the introduction.
671 if (x($_GET,'dfrn_url')) {
673 if (! local_user()) {
674 info( t("Please login to confirm introduction.") . EOL );
675 /* setup the return URL to come back to this page if they use openid */
676 $_SESSION['return_url'] = $a->query_string;
680 // Edge case, but can easily happen in the wild. This person is authenticated,
681 // but not as the person who needs to deal with this request.
683 if ($a->user['nickname'] != $a->argv[1]) {
684 notice( t("Incorrect identity currently logged in. Please login to <strong>this</strong> profile.") . EOL);
688 $dfrn_url = notags(trim(hex2bin($_GET['dfrn_url'])));
689 $aes_allow = (((x($_GET,'aes_allow')) && ($_GET['aes_allow'] == 1)) ? 1 : 0);
690 $confirm_key = (x($_GET,'confirm_key') ? $_GET['confirm_key'] : "");
692 // Checking fastlane for validity
693 if (x($_SESSION, "fastlane") AND (normalise_link($_SESSION["fastlane"]) == normalise_link($dfrn_url))) {
694 $_POST["dfrn_url"] = $dfrn_url;
695 $_POST["confirm_key"] = $confirm_key;
696 $_POST["localconfirm"] = 1;
697 $_POST["hidden-contact"] = 0;
698 $_POST["submit"] = t('Confirm');
700 dfrn_request_post($a);
703 return; // NOTREACHED
706 $tpl = get_markup_template("dfrn_req_confirm.tpl");
707 $o = replace_macros($tpl,array(
708 '$dfrn_url' => $dfrn_url,
709 '$aes_allow' => (($aes_allow) ? '<input type="hidden" name="aes_allow" value="1" />' : "" ),
710 '$hidethem' => t('Hide this contact'),
711 '$hidechecked' => '',
712 '$confirm_key' => $confirm_key,
713 '$welcome' => sprintf( t('Welcome home %s.'), $a->user['username']),
714 '$please' => sprintf( t('Please confirm your introduction/connection request to %s.'), $dfrn_url),
715 '$submit' => t('Confirm'),
716 '$uid' => $_SESSION['uid'],
717 '$nickname' => $a->user['nickname'],
718 'dfrn_rawurl' => $_GET['dfrn_url']
723 elseif((x($_GET,'confirm_key')) && strlen($_GET['confirm_key'])) {
725 // we are the requestee and it is now safe to send our user their introduction,
726 // We could just unblock it, but first we have to jump through a few hoops to
727 // send an email, or even to find out if we need to send an email.
729 $intro = q("SELECT * FROM `intro` WHERE `hash` = '%s' LIMIT 1",
730 dbesc($_GET['confirm_key'])
733 if (dbm::is_result($intro)) {
735 $r = q("SELECT `contact`.*, `user`.* FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid`
736 WHERE `contact`.`id` = %d LIMIT 1",
737 intval($intro[0]['contact-id'])
740 $auto_confirm = false;
742 if (dbm::is_result($r)) {
743 if(($r[0]['page-flags'] != PAGE_NORMAL) && ($r[0]['page-flags'] != PAGE_PRVGROUP))
744 $auto_confirm = true;
746 if(! $auto_confirm) {
749 'type' => NOTIFY_INTRO,
750 'notify_flags' => $r[0]['notify-flags'],
751 'language' => $r[0]['language'],
752 'to_name' => $r[0]['username'],
753 'to_email' => $r[0]['email'],
754 'uid' => $r[0]['uid'],
755 'link' => App::get_baseurl() . '/notifications/intros',
756 'source_name' => ((strlen(stripslashes($r[0]['name']))) ? stripslashes($r[0]['name']) : t('[Name Withheld]')),
757 'source_link' => $r[0]['url'],
758 'source_photo' => $r[0]['photo'],
759 'verb' => ACTIVITY_REQ_FRIEND,
765 require_once('mod/dfrn_confirm.php');
767 'uid' => $r[0]['uid'],
768 'node' => $r[0]['nickname'],
769 'dfrn_id' => $r[0]['issued-id'],
770 'intro_id' => $intro[0]['id'],
771 'duplex' => (($r[0]['page-flags'] == PAGE_FREELOVE) ? 1 : 0),
772 'activity' => intval(get_pconfig($r[0]['uid'],'system','post_newfriend'))
774 dfrn_confirm_post($a,$handsfree);
779 if(! $auto_confirm) {
781 // If we are auto_confirming, this record will have already been nuked
782 // in dfrn_confirm_post()
784 $r = q("UPDATE `intro` SET `blocked` = 0 WHERE `hash` = '%s'",
785 dbesc($_GET['confirm_key'])
791 return; // NOTREACHED
796 * Normal web request. Display our user's introduction form.
799 if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
800 if(! get_config('system','local_block')) {
801 notice( t('Public access denied.') . EOL);
808 * Try to auto-fill the profile address
811 // At first look if an address was provided
812 // Otherwise take the local address
813 if (x($_GET,'addr') AND ($_GET['addr'] != ""))
814 $myaddr = hex2bin($_GET['addr']);
815 elseif (x($_GET,'address') AND ($_GET['address'] != ""))
816 $myaddr = $_GET['address'];
817 elseif (local_user()) {
818 if (strlen($a->path)) {
819 $myaddr = App::get_baseurl() . '/profile/' . $a->user['nickname'];
822 $myaddr = $a->user['nickname'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3 );
827 $myaddr = get_my_url();
830 $target_addr = $a->profile['nickname'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3 );
835 * The auto_request form only has the profile address
836 * because nobody is going to read the comments and
837 * it doesn't matter if they know you or not.
841 if ($a->profile['page-flags'] == PAGE_NORMAL) {
842 $tpl = get_markup_template('dfrn_request.tpl');
845 $tpl = get_markup_template('auto_request.tpl');
848 $page_desc = t("Please enter your 'Identity Address' from one of the following supported communications networks:");
850 // see if we are allowed to have NETWORK_MAIL2 contacts
852 $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
853 if(get_config('system','dfrn_only'))
856 if(! $mail_disabled) {
857 $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
858 intval($a->profile['uid'])
860 if (! dbm::is_result($r)) {
865 // "coming soon" is disabled for now
866 //$emailnet = (($mail_disabled) ? '' : t("<strike>Connect as an email follower</strike> \x28Coming soon\x29"));
869 $invite_desc = sprintf(
870 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>.'),
874 $o = replace_macros($tpl,array(
875 '$header' => t('Friend/Connection Request'),
876 '$desc' => t('Examples: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, testuser@identi.ca'),
877 '$pls_answer' => t('Please answer the following:'),
878 '$does_know_you' => array('knowyou', sprintf(t('Does %s know you?'),$a->profile['name']), false, '', array(t('No'),t('Yes'))),
879 /*'$does_know' => sprintf( t('Does %s know you?'),$a->profile['name']),
882 '$add_note' => t('Add a personal note:'),
883 '$page_desc' => $page_desc,
884 '$friendica' => t('Friendica'),
885 '$statusnet' => t('StatusNet/Federated Social Web'),
886 '$diaspora' => t('Diaspora'),
887 '$diasnote' => sprintf (t(' - please do not use this form. Instead, enter %s into your Diaspora search bar.'),$target_addr),
888 '$your_address' => t('Your Identity Address:'),
889 '$invite_desc' => $invite_desc,
890 '$emailnet' => $emailnet,
891 '$submit' => t('Submit Request'),
892 '$cancel' => t('Cancel'),
893 '$nickname' => $a->argv[1],
894 '$name' => $a->profile['name'],
900 return; // Somebody is fishing.