+ Reply to Thread
Results 1 to 10 of 10

Thread: how to delete inactive users

  1. #1
    RAMMSTEIN is offline Senior Member
    Join Date
    Feb 2008
    Location
    Greece
    Posts
    242

    Default how to delete inactive users

    dose someone know how to delete inactive users??

  2. #2
    buyscripts is offline Super Moderator
    Join Date
    May 2007
    Posts
    831

    Default

    You can delete the Inactive Users through admin area

    User Admin = > Inactive Users = > Delete

  3. #3
    RAMMSTEIN is offline Senior Member
    Join Date
    Feb 2008
    Location
    Greece
    Posts
    242

    Default

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

  4. #4
    carefree2 is offline Member
    Join Date
    May 2009
    Posts
    58

    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
    RAMMSTEIN is offline Senior Member
    Join Date
    Feb 2008
    Location
    Greece
    Posts
    242

    Default

    i used this for 2.7

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

  6. #6
    Join Date
    Jul 2008
    Posts
    35

    Cool

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

  7. #7
    grynmoors is offline Senior Member
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,459

    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.


  8. #8
    bplex is offline Senior Member
    Join Date
    Sep 2008
    Posts
    1,014

    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
    vshare is offline Moderator
    Join Date
    Dec 2009
    Posts
    72

    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
    frak is offline Junior Member
    Join Date
    Sep 2009
    Posts
    12

    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

+ Reply to Thread

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