20 public function addFriend(
int $friend_guid,
bool $create_river_item =
false) {
25 if (!$this->addRelationship($friend_guid,
'friend')) {
29 if ($create_river_item) {
31 'view' =>
'river/relationship/friend/create',
32 'action_type' =>
'friend',
33 'subject_guid' => $this->guid,
34 'object_guid' => $friend_guid,
48 public function removeFriend(
int $friend_guid): bool {
49 return $this->removeRelationship($friend_guid,
'friend');
59 public function isFriendsWith(
int $user_guid): bool {
60 return $this->hasRelationship($user_guid,
'friend');
70 public function isFriendOf(
int $user_guid): bool {
71 return (
bool)
_elgg_services()->relationshipsTable->check($user_guid,
'friend', $this->guid);
elgg_create_river_item(array $options=[])
Elgg river.
$friend_guid
Assembles and outputs the registration page.
get_user(int $guid)
Elgg users Functions to manage multiple or single users in an Elgg install.
_elgg_services()
Get the global service provider.