DanishAdam
Member
- Jan 28, 2020
- 69
- 15
Hello devbest
Why'd I got this error? Please help. I use Brain CMS 1.8.1
Why'd I got this error? Please help. I use Brain CMS 1.8.1
You must be registered for see images attach
$config['hotelEmu'] = 'arcturus'; // plusemu // arcturus
public static...
When you right click, and open up Inspect Element, what does it say in the Console tab?
If you use the English language in Brain CMS, and you get that error on the register page, it should say why in the Console.
Edit: What Emulator are you using? To my knowledge BrainCMS only works correctly with PlusEmu and Arcturus. I myself use Arcturus Morningstar and everything works fine.
It's looking for "ip_reg" in the users table which doesnt exists. Modify the register method where ever it's on Brain to match your Arcturus morningstar columnsThis is what you asking for. Btw thanks for responding!
I use Arcturus Morningstar
You must be registered for see images attach
What should I do?
$config['hotelEmu'] = 'arcturus'; // plusemu // arcturus
public static function refUser($refUsername)
{
global $dbh, $lang;
$getUsernameRef = $dbh->prepare("SELECT username,ip_reg FROM users WHERE username = :username LIMIT 1");
$getUsernameRef->bindParam(':username', $refUsername);
$getUsernameRef->execute();
$getUsernameRefData = $getUsernameRef->fetch();
if ($getUsernameRef->RowCount() > 0)
{
if ($getUsernameRefData['ip_reg'] == userIp())
{
//html::error($lang["RsameIpRef"]);
echo 'ref_error';
}
else
{
return true;
}
}
else
{
//html::error($lang["RnotExist"]);
echo 'ref_error';
return false;
}
}
public static function refUser($refUsername)
{
global $dbh, $lang;
$getUsernameRef = $dbh->prepare("SELECT username,ip_register FROM users WHERE username = :username LIMIT 1");
$getUsernameRef->bindParam(':username', $refUsername);
$getUsernameRef->execute();
$getUsernameRefData = $getUsernameRef->fetch();
if ($getUsernameRef->RowCount() > 0)
{
if ($getUsernameRefData['ip_register'] == userIp())
{
//html::error($lang["RsameIpRef"]);
echo 'ref_error';
}
else
{
return true;
}
}
else
{
//html::error($lang["RnotExist"]);
echo 'ref_error';
return false;
}
}
yes absolutely true! in db its named "ip_register". Now it fixed. Thank you!It's looking for "ip_reg" in the users table which doesnt exists. Modify the register method where ever it's on Brain to match your Arcturus morningstar columns
Thank you, the second method is works! Thank you for helping me solve this error!Hmm, this is tricky. It says it can't find the column in your database called "ip_reg" which shouldn't be a problem since I don't have it either.
I assume you've imported the database from BrainCMS and Arcturus Morningstar in the same database you're using?
Have you also change your Emulator to arcturus in your brain-config.php file? That file can be found in folder: system
The line should be:
PHP:$config['hotelEmu'] = 'arcturus'; // plusemu // arcturus
If that doesn't work you could try to change another php file, but I doubt that will fix it...
That is, you open "class.user.php" which can be found in system/app/classes
There you go to line 146, and change ip_reg to ip_register. See the code below.
From:
PHP:public static function refUser($refUsername) { global $dbh, $lang; $getUsernameRef = $dbh->prepare("SELECT username,ip_reg FROM users WHERE username = :username LIMIT 1"); $getUsernameRef->bindParam(':username', $refUsername); $getUsernameRef->execute(); $getUsernameRefData = $getUsernameRef->fetch(); if ($getUsernameRef->RowCount() > 0) { if ($getUsernameRefData['ip_reg'] == userIp()) { //html::error($lang["RsameIpRef"]); echo 'ref_error'; } else { return true; } } else { //html::error($lang["RnotExist"]); echo 'ref_error'; return false; } }
To:
PHP:public static function refUser($refUsername) { global $dbh, $lang; $getUsernameRef = $dbh->prepare("SELECT username,ip_register FROM users WHERE username = :username LIMIT 1"); $getUsernameRef->bindParam(':username', $refUsername); $getUsernameRef->execute(); $getUsernameRefData = $getUsernameRef->fetch(); if ($getUsernameRef->RowCount() > 0) { if ($getUsernameRefData['ip_register'] == userIp()) { //html::error($lang["RsameIpRef"]); echo 'ref_error'; } else { return true; } } else { //html::error($lang["RnotExist"]); echo 'ref_error'; return false; } }
I hope the first solution works, if it doesn't, I hope the second one works.
If still nothing works, let me know and we and hopefully other people on this forum can help you out!