diff --git a/src/acore-wp-plugin/src/Components/UserPanel/UserController.php b/src/acore-wp-plugin/src/Components/UserPanel/UserController.php
index d4a3c2c31..1199fb418 100644
--- a/src/acore-wp-plugin/src/Components/UserPanel/UserController.php
+++ b/src/acore-wp-plugin/src/Components/UserPanel/UserController.php
@@ -97,32 +97,40 @@ public function showRafProgress() {
if (!isset($accId)) {
wp_die("
An error ocurred while loading your account information, please try again later. If this errors continues, please ask for support.
");
}
- $query = "SELECT `account_id`, `recruiter_account`, `time_stamp`, `ip_abuse_counter`, `kick_counter`
- FROM `recruit_a_friend_links`
- WHERE `account_id` = $accId
- ";
- $conn = $acServices->getElunaMgr()->getConnection();
- $queryResult = $conn->executeQuery($query);
- $rafPersonalInfo = $queryResult->fetchAssociative();
-
- $query = "SELECT COALESCE(`reward_level`, 0) as reward_level
- FROM `recruit_a_friend_rewards`
- WHERE `recruiter_account` = $accId
- ";
- $conn = $acServices->getElunaMgr()->getConnection();
- $queryResult = $conn->executeQuery($query);
- $rafPersonalProgress = $queryResult->fetchAssociative();
-
- if (!isset($rafPersonalProgress['reward_level'])) {
- $rafPersonalProgress = ['reward_level' => 0];
- }
- $query = "SELECT `account_id`, `recruiter_account`, `time_stamp`, `ip_abuse_counter`, `kick_counter`
- FROM `recruit_a_friend_links`
- WHERE `recruiter_account` = $accId
- ";
- $queryResult = $conn->executeQuery($query);
- $rafRecruitedInfo = $queryResult->fetchAllAssociative();
+ try {
+ $conn = $acServices->getElunaMgr()->getConnection();
+
+ $query = "SELECT `account_id`, `recruiter_account`, `time_stamp`, `ip_abuse_counter`, `kick_counter`
+ FROM `recruit_a_friend_links`
+ WHERE `account_id` = $accId
+ ";
+ $queryResult = $conn->executeQuery($query);
+ $rafPersonalInfo = $queryResult->fetchAssociative();
+
+ $query = "SELECT COALESCE(`reward_level`, 0) as reward_level
+ FROM `recruit_a_friend_rewards`
+ WHERE `recruiter_account` = $accId
+ ";
+ $queryResult = $conn->executeQuery($query);
+ $rafPersonalProgress = $queryResult->fetchAssociative();
+
+ if (!isset($rafPersonalProgress['reward_level'])) {
+ $rafPersonalProgress = ['reward_level' => 0];
+ }
+
+ $query = "SELECT `account_id`, `recruiter_account`, `time_stamp`, `ip_abuse_counter`, `kick_counter`
+ FROM `recruit_a_friend_links`
+ WHERE `recruiter_account` = $accId
+ ";
+ $queryResult = $conn->executeQuery($query);
+ $rafRecruitedInfo = $queryResult->fetchAllAssociative();
+ } catch (\Exception $e) {
+ echo '
Recruit a Friend
'
+ . '
No Recruit-A-Friend installation was found. '
+ . 'Please ensure the Eluna database is properly configured and the RAF module is installed on your server.
';
+ return;
+ }
echo $this->getView()->getRafProgressRender($rafPersonalInfo, $rafPersonalProgress, $rafRecruitedInfo);
}
diff --git a/src/acore-wp-plugin/src/Manager/Opts.php b/src/acore-wp-plugin/src/Manager/Opts.php
index 5cea638bc..d94880216 100644
--- a/src/acore-wp-plugin/src/Manager/Opts.php
+++ b/src/acore-wp-plugin/src/Manager/Opts.php
@@ -36,7 +36,7 @@ class Opts {
public $acore_db_eluna_pass="";
public $acore_db_eluna_name="";
public $eluna_recruit_a_friend="";
- public $eluna_raf_config=["check_ip" => '0'];
+ public $eluna_raf_config=["check_ip" => '0', "end_raf_on_same_ip" => '1'];
public $acore_resurrection_scroll="";
public $acore_resurrection_scroll_days_inactive="180";
public $acore_item_restoration="";