Not sure, if it has been posted before - its a really simple fix. When you go onto the mod tools and click user info: ... you might notice that cautions, registered date and bans are all just not there or wrong. To fix this simply go to your class.users.php and CTRL + f for "Adding/Updating/Deleting Users" when it comes up just simply highlight the whole thing and change it with this code -
Now when somebody registers on your website it will update it into user_info so when you click user info : --- it will come up with registered date etc. Enjoy
Now when somebody registers on your website it will update it into user_info so when you click user info : --- it will come up with registered date etc. Enjoy
Code:
/*-------------------------------Adding/Updating/Deleting users-------------------------------------*/
final public function addUser($username, $password, $email, $motto, $credits, $pixels, $rank, $figure, $gender, $seckey)
{
if($_POST['ref']){
$ref = $_POST['ref'];
$this->ref($ref);
}else{
global $engine;
$sessionKey = 'RevCMS-'.rand(9,999).'/'.substr(sha1(time()).'/'.rand(9,9999999).'/'.rand(9,9999999).'/'.rand(9,9999999),0,33);
$engine->query("INSERT INTO users (username, password, mail, motto, credits, activity_points, rank, look, gender, seckey, ip_last, ip_reg, account_created, last_online, auth_ticket) VALUES('" . $username . "', '" . $password . "', '" . $email . "', '" . $motto . "', '" . $credits . "', '" . $pixels . "', '" . $rank . "', '" . $figure . "', '" . $gender . "', '" . $seckey . "', '" . $_SERVER['REMOTE_ADDR'] . "', '" . $_SERVER['REMOTE_ADDR'] . "', '" . time() . "', '" . time() . "', '" . $sessionKey . "')");
$user_id = $this->getID($username);
$engine->query("INSERT INTO user_info (user_id, bans, cautions, reg_timestamp, login_timestamp, cfhs, cfhs_abusive) VALUES ('". $user_id ."', '0', '0', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), '0', '0')");
unset($sessionKey);
}
}
final public function deleteUser($k)
{
global $engine;
$engine->query("DELETE FROM users WHERE id = '" . $k . "' LIMIT 1");
$engine->query("DELETE FROM items WHERE userid = '" . $k . "' LIMIT 1");
$engine->query("DELETE FROM rooms WHERE ownerid = '" . $k . "' LIMIT 1");
}
final public function updateUser($k, $key, $value)
{
global $engine;
$engine->query("UPDATE users SET " . $key . " = '" . $engine->secure($value) . "' WHERE id = '" . $k . "' LIMIT 1");
$_SESSION['user'][$key] = $engine->secure($value);
}