Users are being 'auto' deleted

Version
3.13.3
Website URL
http://www.pastepic.xyz
PHP version
7.3
Database driver
MariaDB
Database version
10.1.41-MariaDB-cll-lve - MariaDB Server
Web browser
IE - Chrome - FF

minilarge

Network license
License owner
Joined
Jun 17, 2018
Messages
24
Points
2
ğŸŽ¯Description of the issue

I previously had an issue with 'images' not deleting. Since that issue has been fixed, I have been noticing that each time images are deleted, I'm also losing 'users'. The number of registered users is constantly going down, than back up and than back down.

▶🚶‍Reproduction steps
  1. Go to Dashboard, Stats and take notice of the number of users today
  2. Return another day and take a look at the number, it will be lower
😢Unexpected result

Right now user base is at 508 - it was at 511

📃Error log message
 

Rodolfo

Chevereto Developer
Chevereto Staff
Joined
Oct 7, 2008
Messages
15,625
Points
237
Location
Chevereto HQ
Website
rodolfoberrios.com
chv_users.status = 'valid'

There's no record for deleted users, but you could run backup of the users table then wait a day and compare to see which users are being removed. You could also add a logger to app/loader.php

PHP:
        // Handle invalid user accounts
        if (method_exists('CHV\User', 'cleanUnconfirmed')) {
            try {
                $lock = new Lock('clean-unconfirmed-users');
                if (!$lock->check() && $lock->create()) {
                    User::cleanUnconfirmed(5);
                    $lock->destroy();
                }
            } catch (Exception $e) {
                error_log($e);
            }
        }
 

minilarge

Network license
License owner
Joined
Jun 17, 2018
Messages
24
Points
2
Okay, I've added the code to the loader.php file. Where do I check on the log file in a few days, which directory will it be in?

Thanks,
 

Rodolfo

Chevereto Developer
Chevereto Staff
Joined
Oct 7, 2008
Messages
15,625
Points
237
Location
Chevereto HQ
Website
rodolfoberrios.com
You don't need to add the code I'm showing here, that's the actual function that remove users. You have to put your own logger code there.

Like I said, is easier to just compare the database from one day to another, or simply remove the code if you don't want to get these users removed.

Note that unverified accounts means that the user never clicked the confirmation email, so is very likely that all these accounts are just spammers.