public function addUser($user_guid = 0) { $result = false; if (empty($user_guid)) { $user_guid = elgg_get_logged_in_user_guid(); } if (!empty($user_guid)) { $result = parent::addUser($user_guid); // add the user to the ACL add_user_to_access_collection($user_guid, $this->getACL()); // remove optional invitations for this site $this->removeInvitation($user_guid); // remove optional membership requests $this->removeMembershipRequests($user_guid); // update member_count $this->getMembers(array("count" => true, "force_update_member_count" => true)); } return $result; }