friendica/include/security.php

18 lines
502 B
PHP
Raw Normal View History

2010-07-01 19:48:07 -04:00
<?php
function can_write_wall(&$a,$owner) {
if((! (local_user())) && (! (remote_user())))
return false;
if((local_user()) && ($_SESSION['uid'] == $owner))
return true;
2010-07-19 09:58:03 -04:00
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `id` = %d AND `blocked` = 0 AND `pending` = 0 LIMIT 1",
2010-07-01 19:48:07 -04:00
intval($owner),
intval($_SESSION['visitor_id'])
);
if(count($r))
return true;
return false;
}