]> git.mxchange.org Git - friendica.git/blob - include/security.php
new todo list
[friendica.git] / include / security.php
1 <?php
2
3 function can_write_wall(&$a,$owner) {
4         if((! (local_user())) && (! (remote_user())))
5                 return false;
6         if((local_user()) && ($_SESSION['uid'] == $owner))
7                 return true;
8
9         $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `id` = %d AND `blocked` = 0",
10                 intval($owner),
11                 intval($_SESSION['visitor_id'])
12         );
13         if(count($r))
14                 return true;
15         return false;
16
17 }