mirror of
https://github.com/friendica/friendica
synced 2024-11-18 05:43:42 +00:00
17 lines
476 B
PHP
17 lines
476 B
PHP
<?php
|
|
|
|
function can_write_wall(&$a,$owner) {
|
|
if((! (local_user())) && (! (remote_user())))
|
|
return false;
|
|
if((local_user()) && ($_SESSION['uid'] == $owner))
|
|
return true;
|
|
|
|
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `id` = %d AND `blocked` = 0",
|
|
intval($owner),
|
|
intval($_SESSION['visitor_id'])
|
|
);
|
|
if(count($r))
|
|
return true;
|
|
return false;
|
|
|
|
}
|