Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[ADDON]Delete non connected users automa
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2009-02-05 20:53:52
Ok i made this mode to delete non connected users automaticly, since we have a function for that in functions.php we will use it.

Edit backend/config.php

Put where you want:

//DELETE INACTIDE USERS

$site_config["signup_timeout"] = 2592000; //DeadTime in secondes here 30 days





Edit cleanup.php



Find:



//DELETE PENDING USER ACCOUNTS OVER TIMOUT AGE

$deadtime = gmtime() - $site_config["signup_timeout"];

mysql_query("DELETE FROM users WHERE status = 'pending' AND added < FROM_UNIXTIME($deadtime)");





Add After:



//DELETE NON CONNECTED USER ACCOUNTS OVER TIMOUT AGE

$deadconnect = gmtime() - $site_config["connect_timeout"];

$res = mysql_query("SELECT * FROM users WHERE status='confirmed' AND class < '3' AND last_access < FROM_UNIXTIME($deadconnect) AND enabled='yes' AND donated = '0'");

while ($arr = mysql_fetch_assoc($res)){

$userid = $arr["id"];

$derniere = $arr["last_access"];

deleteaccount($userid);

$since = $site_config["connect_timeout"];

$since1 = ((($since/60)/60)/24);

write_log("<font color=red>Member $arr[username], not connected since $since1 was deleted by system. Last seen: $derniere</font>");

}
Unknown User
2009-02-05 20:57:48
Thanks nightmare...good code
Unknown User
2009-02-06 17:59:57
Damn!

i have apply this patch and i have lost all user!!

who delete this patch??
Unknown User
2009-02-06 18:11:05
"gandalf76, post: 53351":
Damn!i have apply this patch and i have lost all user!!

who delete this patch??

i guess you had a lot of members who have not been active. did you do a backup before you added it? if you did and you want your members back then add them from the backup.
Unknown User
2009-02-06 20:14:12
If you have lost a lot of members is that you had a lot of non connected member, un the first time i lost 1500 members, now it delete 1 or 2 by day.
Unknown User
2009-02-10 17:39:50
i have replace a backup... but it's strange... i have modified a time to 6 month (15552000 sec.) , and after this patch,

only me (admin) 3 moderator and 4-5 user remain!

in my tracker i have 30-40 active user,

I do not understand what has happened..
Unknown User
2009-02-17 14:42:53
//DELETE INACTIDE USERS

$site_config["signup_timeout"] = 2592000; //DeadTime in secondes here 30 days
must be
//DELETE INACTIDE USERS

$site_config["connect_timeout"] = '2592000'; //DeadTime in secondes here 30 days



;)
Unknown User
2009-02-17 14:58:33
only i have lost all user with

Quote:
$site_config["signup_timeout"]
?
Unknown User
2009-02-17 15:19:16
always backup before trying ANY mod out. first rule. BACKUP before trying.
Unknown User
2009-09-19 12:44:02
thanks for this mod !
Unknown User
2009-09-19 13:01:23
welll after install this mod i lost all my members to , 40 000  members in garbage and 1 year too , my tracker is now empty ....
Unknown User
2009-09-19 14:56:30
wow. i hope for you, you made backup. big loss.
2009-10-31 05:06:06
so..........I take it that this mod is no good? Anyone wanna clarify? based on the posts in this thread, it doesnt seem that this mod actually does anything helpful lol
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Unknown User
2009-10-31 06:56:33
//delete inactive user accounts

$secs = 60*86400;

$dt = sqlesc(get_date_time(gmtime() - $secs));

$maxclass = POWER_USER;

mysql_query("DELETE FROM users WHERE parked='no' AND status='confirmed' AND class <= $maxclass AND last_access < $dt");

PARKED ACCOUNT?????????????

Please check code in TT 2.05

:lol:
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728