I've noticed over the past couple of days on my install of SMF 2.0 RC4 that Remove Inactive Members is removing people from the list that it should not be removing. For example some one registered today and I ran the the Remove Inactive Members with the activated their account after 30 days options it removes the act that just registered today from the list of members and those waiting for them to activate their account.
Similar to: http://www.simplemachines.org/community/index.php?topic=239823.msg1546396#msg1546396 (http://www.simplemachines.org/community/index.php?topic=239823.msg1546396#msg1546396)
I might have experienced similar problem, trying to reproduce it now - will post details as soon as I'm able to provide repetitive scenario.
In addition to that, I also run into out of memory problem when trying to run the clean up on around 14k members, where at least half should have been cleaned up. Cranking memory to 384MB directly in Subs-Members.php help for that.
Thx,
michau
If it helps, this can be solved by changing in ManageMaintenance.php
$where_vars = array(
'last_login' => $time_limit,
);
$where = 'mem.last_login < {int:last_login}';
if ($_POST['del_type'] == 'activated')
{
$where .= ' AND mem.is_activated = {int:is_activated}';
$where_vars['is_activated'] = 0;
}
$where_vars = array(
'last_login' => $time_limit,
'date_registered' => $time_limit,
);
if ($_POST['del_type'] == 'activated')
{
$where = 'mem.date_registered < {int:date_registered} AND mem.is_activated = {int:is_activated}';
$where_vars['is_activated'] = 0;
} else {
$where = 'mem.last_login < {int:last_login}';
}
Quote from: emanuele on May 06, 2011, 09:07:29 AM
If it helps, this can be solved by changing in ManageMembers.php
$where_vars = array(
'last_login' => $time_limit,
);
$where = 'mem.last_login < {int:last_login}';
if ($_POST['del_type'] == 'activated')
{
$where .= ' AND mem.is_activated = {int:is_activated}';
$where_vars['is_activated'] = 0;
}
$where_vars = array(
'last_login' => $time_limit,
'date_registered' => $time_limit,
);
if ($_POST['del_type'] == 'activated')
{
$where = 'mem.date_registered < {int:date_registered} AND mem.is_activated = {int:is_activated}';
$where_vars['is_activated'] = 0;
} else {
$where = 'mem.last_login < {int:last_login}';
}
Fix's this issue. Also do note that the code you need to replace is in ManageMaintenance.php not ManageMembers.php
ethankcvds
Quote from: ethankcvds on May 08, 2011, 08:56:21 AM
Also do note that the code you need to replace is in ManageMaintenance.php not ManageMembers.php
Right. :-[
I should stop doing two things at the same time, especially when the two files are named more or less the same... :P
An other thing is this fixed in the latest SVN version or is it still there? If not is it going to be tracked in the bug tracker and fixed for 2.0 final?
this does not seem to be fixed in smf, i am not sure a bug report was created, and if it has been it should be added to the title of this thread.
Quote from: Illori on May 11, 2011, 05:27:51 PM
this does not seem to be fixed in smf, i am not sure a bug report was created, and if it has been it should be added to the title of this thread.
Just found it on the bug tracker http://dev.simplemachines.org/mantis/view.php?id=4716.
This needs moved. The associated issue in Mantis is resolved.
I am running smf 2.0.2 when using 'Remove Inactive members' it also removes members who have a last_login = '0', this includes newish members who have not yet logged in.
It would be preferable if the option:
(1) did not delete accounts not yet activated (as there are options to deal with these elsewhere), or recently activated.
(2) Deleted those who had not logged in for > than the entered time span, those who with last_login == 0 && date_registered > time span
or perhaps
Activation results in a last_login of the date of activation.
Be very gratefull of a solution :)
Yes, that's something that I find annoying (though I don't use pruning, so I forget rather quickly of it... :P).
In ManageMaintenance.php:
$where = 'mem.last_login < {int:time_limit}';
$where = 'mem.last_login < {int:time_limit} AND (mem.last_login != 0 OR mem.date_registered < {int:time_limit})';
That way it should not delete the member that didn't do their first login in the last xx (30) days.
Thank you emanuele, exactly what I needed, much appreciated. 8)