From ca53881cd3b4807425fc04d24e27417cc9564042 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 2 Oct 2016 06:40:08 +0000 Subject: [PATCH] Some more explanations --- include/Contact.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/Contact.php b/include/Contact.php index 936589be98..458f56ce52 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -694,6 +694,9 @@ function formatted_location($profile) { function account_type($contact) { // There are several fields that indicate that the contact or user is a forum + // "page-flags" is a field in the user table, + // "forum" and "prv" are used in the contact table. They stand for PAGE_COMMUNITY and PAGE_PRVGROUP. + // "community" is used in the gcontact table and is true if the contact is PAGE_COMMUNITY or PAGE_PRVGROUP. if((isset($contact['page-flags']) && (intval($contact['page-flags']) == PAGE_COMMUNITY)) || (isset($contact['page-flags']) && (intval($contact['page-flags']) == PAGE_PRVGROUP)) || (isset($contact['forum']) && intval($contact['forum'])) @@ -703,7 +706,7 @@ function account_type($contact) { else $type = ACCOUNT_TYPE_PERSON; - // The field is named differently in the user and the contact record + // The "contact-type" (contact table) and "account-type" (user table) are more general then the chaos from above. if (isset($contact["contact-type"])) $type = $contact["contact-type"]; if (isset($contact["account-type"]))