Purging users pending approval, and some other stuff

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Purging users pending approval, and some other stuff
« on December 14th, 2012, 10:07 PM »
So, working on the whole nature of is_activated spawns a few ideas.

1) Purging users pending approval
One of the things that I hear regularly from other forum software is that users tend to delete users who haven't approved their email in a couple of days. To me, this makes a fair amount of sense, if a user hasn't activated their account within a day or so of signup, odds are they're not going to. So, it also makes sense to me, then, that after a day or so, we could automatically purge that for admins.

I don't see this causing significant extra load anywhere, nor do I see it causing any other problems at this time, but I'm opening the floor to discussions and thoughts on the subject.


2) User re-agreeing to agreement (required re-agreement)
This is something I've wanted to add for a while, and I mentioned it in my other topic. Mechanically all you'd do is take any user that already got approved (is_activated state 1) and update it to a new state (provisionally state 6) when the details change to force them to agree to it again, and since it's wired in at account level, they'd *have* to do it to continue.

The problem with this is the case of users who are not currently state 1, all the little fringe cases where their account is somewhere else:
* state 0 - user has signed up and in the time between signing up and approving their account, the terms changed
* state 2 - user is a current member but has changed their email address
* state 3 - user is waiting for admin approval, much like state 0, it's possible the terms changed between their registration and admin approval
* state 4 - user is waiting for account deletion, probably not a problem!
* state 5 - user is waiting for COPPA approval, this is probably the most likely problematic, a user subject to this is very likely going to have to wait some time to actually get their account approved as they would have to send the form through the post, and that makes it more likely to have changed

Actually now that I really think about it, all we really need to do is track their registration time against the time the agreement was last edited, and if they registered before the agreement changes, move their state to 6 rather than to 1. In fact, if we do it as a 'last change to status' column in general, that problem goes away in its entirety. Talking it through really does work!


3) We could drop the Location profile field and make it a custom profile field.
It's not a thing I've seen that much, dropping from the core and making it a CPF means it's not cluttering up the members table, and it's only in use if someone actually wants it on their forum, rather than being on by default and only able to softly disable it.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Powerbob

  • Posts: 151

spoogs

  • Posts: 417
Stick a fork in it SMF

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Purging users pending approval, and some other stuff
« Reply #3, on December 15th, 2012, 05:58 PM »
1) Yes, admins would be able to set the number of days. I have no idea where this would be configured, though. I'm thinking 3 days would be the default.

2) I've already added the new column into my local copy ready for later use.

3) There is one downside to doing that, and that's the fact that the 'location' would not be translated into other languages. With profile fields normally this is not a big deal because most of the time the profile fields are set names that won't translate, e.g. Facebook. And for single-language communities of course it's no big deal. But multi-language communities might find it slightly jarring... but all in all that seems like a minor compromise.

spoogs

  • Posts: 417

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Purging users pending approval, and some other stuff
« Reply #5, on December 15th, 2012, 08:44 PM »
It would have to be visible only if *email* approval is selected, since admin approval is totally up to the admin and I don't think it's fair to purge that on a schedule.

spoogs

  • Posts: 417

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Purging users pending approval, and some other stuff
« Reply #8, on December 31st, 2012, 07:17 PM »
So I've added this. It doesn't do anything pretty like hide the option when not applicable, nor does it have a default of 3 days in there, but otherwise it will be there when I commit the silly mistake I just fixed.

Nao

  • Dadman with a boy
  • Posts: 16,063
Re: Purging users pending approval, and some other stuff
« Reply #9, on December 31st, 2012, 07:37 PM »
I think the default should be 30 days... Isn't that the maximum value in this field anyway?
Really, thanks for implementing this. I had a hard time last week removing 500+ members who hadn't activated (spam bots), was actually considering doing something like this but I'd have been too lazy to implement it myself... It's like you read my mind ;)

Oh, while I'm at it... I have plenty of comments/questions on your latest batch of commits, but can't bother to find the comments topic, so if you have two minutes, please bump it for me :P
Will be unavailable tonight, anyway... (Not much, at least.)

Ah yes, and I found a bug on noisen.com, can you verify that it isn't in Wedge as well..? I had two questions set in anti-spam, and it was set to only ask 1, so I entered 2 and saved. It then showed me '0'... I modified it again, again 0. I tried '3' and it set it to '2'... Works that way.
It's likely that it was already fixed in Wedge or SMF 2.0, but it doesn't cost anything to mention that ;)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Purging users pending approval, and some other stuff
« Reply #10, on December 31st, 2012, 07:39 PM »
Quote
I think the default should be 30 days... Isn't that the maximum value in this field anyway?
The maximum is 30 days, yes. That just seemed like a meaningful value.
Quote
Oh, while I'm at it... I have plenty of comments/questions on your latest batch of commits, but can't bother to find the comments topic, so if you have two minutes, please bump it for me
Start new topics on the bits you're not clear on. As I said, the ban stuff is... unfinished.
Quote
I had two questions set in anti-spam, and it was set to only ask 1, so I entered 2 and saved. It then showed me '0'... I modified it again, again 0. I tried '3' and it set it to '2'... Works that way.
Considering that I totally rewrote how the questions work between how SMF did it and how Wedge does it, the odds of it keeping an SMF bug are somewhat limited...
Re: Purging users pending approval, and some other stuff
« Reply #12, on March 4th, 2013, 06:27 AM »
I've been working on the re-agreement part and it's shaping up to be all shiny and awesome.

So far I have it so that it is handling all the registration stuff and jumping around of states properly as far as I can tell, and if the agreement has been updated, it will notify the user.

There's two levels of this, either full or post-only. In the full case, just about everything is locked out until reagreement, in the post only case, only posting is locked out (as screenshot), and a warning is put in the post form and in place of quick reply. Post drafts are also saved in this situation and even should continue to be if there is a full lockout.

PMs are not affected by the post-only mode (in any fashion, there is absolutely no code for it) and should not be affected by the full lock out either - this is to allow users to contact the admin if they need to discuss anything.

I just need to make the admin UI which should be a smallish job tomorrow then I can commit this stuff, yay!

I do also have a few other things I found along the way to commit too ^_^

 reagreement.png - 41.86 kB, 924x696, viewed 74 times.


MultiformeIngegno

  • Posts: 1,337
Re: Purging users pending approval, and some other stuff
« Reply #13, on March 4th, 2013, 10:32 AM »
Does the reagreement appear always when the admin change the terms of use or it's a choice in the admin panel to have this reagreement when there's a change?
Because on some countries it's needed just the acknowledgement of the changes, users have a given time to choose if accept the new terms (just by remaining signed) or terminating the contract deregistering.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Purging users pending approval, and some other stuff
« Reply #14, on March 4th, 2013, 04:21 PM »
Quote
Does the reagreement appear always when the admin change the terms of use or it's a choice in the admin panel to have this reagreement when there's a change?
Admin will have the choice (just need to write that), ultimately there are three consequences of changing the agreement, all of which is admin choice:

1. Change it, don't force users to reagree (thus only new users need to, e.g. a non-consequential edit, e.g. spelling, formatting fixes)
2. Change it, force users to reagree but only if they want to post
3. Change it, force users to reagree and don't let them do anything else