diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-07-01 16:48:07 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-07-01 16:48:07 -0700 |
commit | 6348e70daa113e8b3203de8fbc919d08c90d972e (patch) | |
tree | 1bc3dd3bc85fe6136411086785cf6753960e22f9 /include/security.php | |
download | volse-hubzilla-6348e70daa113e8b3203de8fbc919d08c90d972e.tar.gz volse-hubzilla-6348e70daa113e8b3203de8fbc919d08c90d972e.tar.bz2 volse-hubzilla-6348e70daa113e8b3203de8fbc919d08c90d972e.zip |
Initial checkin
Diffstat (limited to 'include/security.php')
-rw-r--r-- | include/security.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/security.php b/include/security.php new file mode 100644 index 000000000..8b3452534 --- /dev/null +++ b/include/security.php @@ -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; + +} |