Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Tutorials
[R63 REVCMS HOW TO] User Info MOD Tools
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="C0dy" data-source="post: 358082" data-attributes="member: 64394"><p>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 -</p><p>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</p><p>[CODE] /*-------------------------------Adding/Updating/Deleting users-------------------------------------*/ </p><p> </p><p> final public function addUser($username, $password, $email, $motto, $credits, $pixels, $rank, $figure, $gender, $seckey) </p><p> { </p><p> </p><p> if($_POST['ref']){</p><p> $ref = $_POST['ref'];</p><p> $this->ref($ref);</p><p> }else{</p><p> </p><p> global $engine;</p><p> $sessionKey = 'RevCMS-'.rand(9,999).'/'.substr(sha1(time()).'/'.rand(9,9999999).'/'.rand(9,9999999).'/'.rand(9,9999999),0,33);</p><p> $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 . "')"); </p><p> $user_id = $this->getID($username);</p><p> $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')");</p><p> unset($sessionKey); </p><p> }</p><p> } </p><p> </p><p> final public function deleteUser($k) </p><p> { </p><p> global $engine; </p><p> $engine->query("DELETE FROM users WHERE id = '" . $k . "' LIMIT 1"); </p><p> $engine->query("DELETE FROM items WHERE userid = '" . $k . "' LIMIT 1"); </p><p> $engine->query("DELETE FROM rooms WHERE ownerid = '" . $k . "' LIMIT 1"); </p><p> } </p><p> </p><p> final public function updateUser($k, $key, $value) </p><p> { </p><p> global $engine; </p><p> $engine->query("UPDATE users SET " . $key . " = '" . $engine->secure($value) . "' WHERE id = '" . $k . "' LIMIT 1");</p><p> $_SESSION['user'][$key] = $engine->secure($value); </p><p> } </p><p> [/CODE]</p></blockquote><p></p>
[QUOTE="C0dy, post: 358082, member: 64394"] 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 [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); } [/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Tutorials
[R63 REVCMS HOW TO] User Info MOD Tools
Top