aboutsummaryrefslogtreecommitdiffstats
path: root/include/Contact.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/Contact.php')
-rw-r--r--include/Contact.php54
1 files changed, 54 insertions, 0 deletions
diff --git a/include/Contact.php b/include/Contact.php
index c141fa188..5e0964d03 100644
--- a/include/Contact.php
+++ b/include/Contact.php
@@ -1,6 +1,60 @@
<?php
+function map_perms($entity,$zguid) {
+
+ $is_contact = false;
+ $is_site = false;
+ $is_network = false;
+ $is_anybody = true;
+
+ if(strlen($zguid)) {
+
+ $is_network = true;
+
+ $r = q("select * from contact where guid = '%s' and uid = %d limit 1",
+ dbesc($zguid),
+ intval($entity['entity_id'])
+ );
+ if($r && count($r)) {
+ $is_contact = true;
+ $contact = $r[0];
+ }
+ $r = q("select * from entity where entity_global_id = '%s' limit 1",
+ dbesc($zguid)
+ );
+ if($r && count($r)) {
+ $is_site = true;
+ }
+ }
+
+
+
+
+
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
// Included here for completeness, but this is a very dangerous operation.
// It is the caller's responsibility to confirm the requestor's intent and
// authorisation to do this.