aboutsummaryrefslogtreecommitdiffstats
path: root/include/security.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/security.php')
-rw-r--r--include/security.php17
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;
+
+}