'Friends' is a mechanism within CONGO to link one registrant to another.
Tenets
There are a couple basic tenets.
- A friend link must be 'approved' before going active. A registrant cannot Friend another registrant and see their status until the target registrant approves it.
- Friend links are one-way. If registrant A friends registrant B, B will be able to see A's status, but until B friends A, B's status will be hidden from A.
- A registrant always has the option of 'un-friending' another registrant.
- Friends lists may be maintained by administrators in order to facillitate groups / families / etc.
Table schema
mysql> describe reg_friends ;
+-------------------+--------------+------+-----+---------------------+-----------------------------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+--------------+------+-----+---------------------+-----------------------------+
| friend_rid | int(8) | NO | PRI | NULL | |
| friend_friendrid | int(8) | YES | | NULL | |
| friend_requestkey | varchar(255) | YES | | NULL | |
| frind_requestdate | timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
| friend_date | timestamp | NO | | 0000-00-00 00:00:00 | |
+-------------------+--------------+------+-----+---------------------+-----------------------------+
- friend_rid : The source of the friends link.
- friend_friendrid : the 'target' of the friends link. "This person is a friend of friend_rid..."
- friend_requestkey : When a friend request is generated, this is the md5 key request used in the email link
- friend_requestdate : When the friend request was generated
- friend_date : When the friend link became active or changed state
- friend_status : OK, INACTIVE, PENDING
- OK - the link is enabled
- PENDING - Waiting for a pending invite to be acknowledged
- INACTIVE - A friends link has been disabled ('un-friended')