]> git.mxchange.org Git - friendica.git/blob - mod/xrd.php
working on readonly contact attribute
[friendica.git] / mod / xrd.php
1 <?php
2
3
4 function xrd_content(&$a) {
5
6         $uri = notags(trim($_GET['uri']));
7         $local = str_replace('acct:', '', $uri);
8         $name = substr($local,0,strpos($local,'@'));
9
10         $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' LIMIT 1",
11                 dbesc($name)
12         );
13         if(! count($r))
14                 killme();
15
16         $tpl = file_get_contents('view/xrd_person.tpl');
17
18         $o = replace_macros($tpl, array(
19                 '$accturi' => $uri,
20                 '$profile_url' => $a->get_baseurl() . '/profile/' . $r[0]['nickname'],
21                 '$photo' => $a->get_baseurl() . '/photo/profile/' . $r[0]['uid']
22         ));
23
24         echo $o;
25         killme();
26
27 }