Results 1 to 10 of 10

Thread: how to delete inactive users

  1. #1
    Join Date
    Feb 2008
    Location
    Greece
    Posts
    235

    Default how to delete inactive users

    dose someone know how to delete inactive users??

  2. #2

    Default

    You can delete the Inactive Users through admin area

    User Admin = > Inactive Users = > Delete

  3. #3
    Join Date
    Feb 2008
    Location
    Greece
    Posts
    235

    Default

    yes you can do that there deleting on by one but if someone have more than 7000 inactive users :(

  4. #4

    Default

    Save as user_delete.php, run once in browser. Set cron to run this once a year

    Code:
    include ('include/config.php');
    
    $sql = mysql_query("DELETE FROM signup WHERE account_status='inactive'") or die(mysql_error());

  5. #5
    Join Date
    Feb 2008
    Location
    Greece
    Posts
    235

    Default

    i used this for 2.7

    PHP Code:
    DELETE FROM users WHERE user_account_status='inactive' 

  6. #6

    Cool

    this should be a default option in admin control , i just checked my site there were 6000+ inactive users :(

  7. #7
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default

    Need same for inactive videos.

    I would consider people who have not logged in for over a year as an inactive user. How do we delete people whos last log in was, say...sometime in 2009 or older?

    Code:
    DELETE FROM users WHERE user_last_login_time='???????????'
    Last edited by grynmoors; 08-18-2010 at 09:26 PM.
    If it's not fun, stop doing it!

  8. #8
    Join Date
    Sep 2008
    Posts
    1,019

    Default

    To delete users who have not logged in since 2009, you would use:

    Code:
    delete from users where user_last_login_time<1262304000
    vShare Solutions
    Custom vShare Modules and Services

    Now, your visitors can watch videos on your site using their mobile or tablet device with the Mobility Mod for vShare 2.8!

  9. #9
    Join Date
    Dec 2009
    Posts
    71

    Default

    To delete users who have not logged in since last year, add this code into cron.php:
    Code:
    $sql = "DELETE FROM `users` WHERE `user_last_login_time`<'" . strtotime("last Year") . "'";
    mysql_query($sql);
    Thanks,

  10. #10
    Join Date
    Sep 2009
    Posts
    14

    Default

    i d like to send out a friendly reminder to users have not logged since a while(+months) similar to some forum scripts...any help? thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •