mirror of
https://github.com/friendica/friendica
synced 2025-04-26 04:30:11 +00:00
Initial checkin
This commit is contained in:
commit
6348e70daa
393 changed files with 59765 additions and 0 deletions
17
include/security.php
Normal file
17
include/security.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?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;
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue