IP.Board  3.3.0
profileFriendsLib Class Reference

Public Member Functions

 __construct (ipsRegistry $registry)
 addFriend ($friend_id, $from_id=0, $forceApproval=false, $sendNotification=true)
 recacheFriends ($member)
 removeFriend ($friend_id, $from_id=0)

Data Fields

 $pendingApproval = false

Protected Member Functions

 _addFloodEntry ($member_id, $friend_id)
 _canAddFriend ($member_id, $friend_id)
 _cleanFloodTable ()

Protected Attributes

 $DB
 $member
 $memberData
 $registry
 $request
 $settings

Constructor & Destructor Documentation

__construct ( ipsRegistry registry)

Constructor

Parameters:
object$registryRegistry object
Returns:
void

Member Function Documentation

_addFloodEntry ( member_id,
friend_id 
) [protected]

Add entry to the flood table

Parameters:
intMember ID
intFriend ID
Returns:
boolean
_canAddFriend ( member_id,
friend_id 
) [protected]

Check to see if we can add this member Just checks flood table right now, but this can be expanded upon

Parameters:
intMember ID
intFriend ID
Returns:
boolean
_cleanFloodTable ( ) [protected]

Clean flood table

addFriend ( friend_id,
from_id = 0,
forceApproval = false,
sendNotification = true 
)

Adds a friend to the account that is logged in or specified

Parameters:
integer$friend_idThe friend being added to the account
integer$from_idThe requesting member, defaults to current member
boolean$forceApprovalAutomatically approve, regardless of setting
boolean$sendNotificationIf false, no notification will be sent to the member being added
Returns:
string Error Key or blank for success
recacheFriends ( member)

Recaches member's friends

Parameters:
array$memberMember array to recache
Returns:
boolean
removeFriend ( friend_id,
from_id = 0 
)

Removes a friend from the logged in account

Parameters:
integer$friend_idThe friend being removed
integer$from_idThe requesting member, defaults to current member
Returns:
string Error Key or blank for success

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables