I have been trying to find out why and I found this :

core-facebook/Model/Service.php => file that handles the registration via FB (my assumption) :

            $iFriendId = (int)Phpfox::getParam('user.on_register_privacy_setting');
            if ($iFriendId > 0 && Phpfox::isModule('friend')) {
                $iCheckFriend = db()->select('COUNT(*)')
                    ->from(Phpfox::getT('friend'))
                    ->where('user_id = ' . (int)$id . ' AND friend_user_id = ' . (int)$iFriendId)
                    ->execute('getSlaveField');

                if (!$iCheckFriend) {
                    db()->insert(Phpfox::getT('friend'), array(
                            'list_id' => 0,
                            'user_id' => $id,
                            'friend_user_id' => $iFriendId,
                            'time_stamp' => PHPFOX_TIME
                        )
                    );

                    db()->insert(Phpfox::getT('friend'), array(
                            'list_id' => 0,
                            'user_id' => $iFriendId,
                            'friend_user_id' => $id,
                            'time_stamp' => PHPFOX_TIME
                        )
                    );

                    if (!Phpfox::getParam('user.approve_users')) {
                        Phpfox::getService('friend.process')->updateFriendCount($id, $iFriendId);
                        Phpfox::getService('friend.process')->updateFriendCount($iFriendId, $id);
                    }
                }
            }

While for regular registration by email :

user/service/process.php

            $iFriendId = (int)Phpfox::getParam('user.on_signup_new_friend');
            if ($iFriendId > 0 && Phpfox::isModule('friend')) {
                $iCheckFriend = $this->database()->select('COUNT(*)')
                    ->from(Phpfox::getT('friend'))
                    ->where('user_id = ' . (int)$iId . ' AND friend_user_id = ' . (int)$iFriendId)
                    ->execute('getSlaveField');

                if (!$iCheckFriend) {
                    $this->database()->insert(Phpfox::getT('friend'), [
                            'list_id'        => 0,
                            'user_id'        => $iId,
                            'friend_user_id' => $iFriendId,
                            'time_stamp'     => PHPFOX_TIME
                        ]
                    );

                    $this->database()->insert(Phpfox::getT('friend'), [
                            'list_id'        => 0,
                            'user_id'        => $iFriendId,
                            'friend_user_id' => $iId,
                            'time_stamp'     => PHPFOX_TIME
                        ]
                    );

                    Phpfox::getService('friend.process')->updateFriendCount($iId, $iFriendId);
                    Phpfox::getService('friend.process')->updateFriendCount($iFriendId, $iId);
                }
            }
            if ($sPlugin = Phpfox_Plugin::get('user.service_process_add_check_1')) {
                eval($sPlugin);
            }

 

I think this is a bug.

Can anyone confirm this?

Thank you.

Last update on February 16, 2021 by Koern.
Be the first person to like this.
Hannah

Hi Koern,

Thank you for report this issue. We would like to confirm this issue already fixed on the Facebook app v.4.6.4.  Please upgrade your app to the latest version to fix this issue.

Best regards,

Hannah

Be the first person to like this.

Hi Hannah,

I am using 4.8.1.

Be the first person to like this.
Hannah

Hi Koern,

I would like to mention to Facebook connection app, not phpFox version. Please update this app in our store:

https://store.phpfox.com/apps/facebook-connect

Regards

Hannah

Hi Hannah,

Thank you for the explanation.

I am using 4.6.3 and will upgrade to 4.6.4 as you recommend. I hope I do not need to upgrade Phpfox to the latest version because I have a heavily customized version and have no intention to upgrade yet.

Thank you.