diff options
Diffstat (limited to 'include/security.php')
-rw-r--r-- | include/security.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/security.php b/include/security.php index a71391dba..29334549b 100644 --- a/include/security.php +++ b/include/security.php @@ -6,9 +6,12 @@ function can_write_wall(&$a,$owner) { if((local_user()) && ($_SESSION['uid'] == $owner)) return true; - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `id` = %d AND `blocked` = 0 AND `pending` = 0 LIMIT 1", + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `id` = %d AND `blocked` = 0 AND `pending` = 0 + AND `readonly` = 0 AND `rel` IN ( %d , %d ) LIMIT 1", intval($owner), - intval($_SESSION['visitor_id']) + intval($_SESSION['visitor_id']), + intval(DIRECTION_OUT), + intval(DIRECTION_BOTH) ); if(count($r)) return true; |