aboutsummaryrefslogtreecommitdiffstats
path: root/include/Contact.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-09-09 21:17:06 -0700
committerfriendica <info@friendica.com>2012-09-09 21:17:06 -0700
commit3ebb4a3dc7a369e7a716ab93d02b44b20522080f (patch)
tree5b8daecf7a29c6fe2f0c8572204d9e2bd1713a50 /include/Contact.php
parenta08666be142c484134c2f10cf0c460c8a3c07682 (diff)
downloadvolse-hubzilla-3ebb4a3dc7a369e7a716ab93d02b44b20522080f.tar.gz
volse-hubzilla-3ebb4a3dc7a369e7a716ab93d02b44b20522080f.tar.bz2
volse-hubzilla-3ebb4a3dc7a369e7a716ab93d02b44b20522080f.zip
updates
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.