[FIXED] Never logged in users always pruned (member pruning)

Submitted by Anonymous on Thu, 08/19/2010 - 00:58
Written by
nathanf

When the admin pre-registers a member, that member's last login time is set to 0. When you prune members, it deletes all members with a login time less than a certain number, INCLUDING PRE-REGISTERED MEMBERS. This seems a little heavy-handed. It's a quick fix: just add a where statement into the prune members page that forbids it to delete any members with a last-login time of 0.

I understand what you are trying to say, but I don't think it really works that way. There's no real "pre-registered" member. The member is either registered or not. If you add a member through the ACP, they simply need to log in. If you dont want to them to be pruned, they you may need to choose a different pruning option rather than by last login. I generally only prune members who haven't validated/activated their account. This doesn't remove members that never logged in, but members that never clicked on the activation link in the confirmation mail.

True, but since you can't see who you are deleting when you prune according to last login, it seems very likely that an admin would forget that they registered someone and only find out later when they get an angry email. Perhaps this is in the wrong forum, b/c it isn't exactly a bug, but to me it seems like a flaw. I changed it, anyway.

Not really, the tool does what it's supposed to do, it deletes users that haven't logged in last under a certain time. The only way you could make it not remove admin registered users with the current build is to include all users that never logged in. Which kind of defeats the purpose of that specific pruning option.

I fixed this in CVS by adding a preview feature plus changing the condition on how inactive members are selected.

Previously, only last login date was used, which indeed gives a problem with any user that never logged in. Now, the greatest of last login and registration date is used, so these members will only be pruned if they have registered at least x days ago.

The feature now does what it is supposed to do.