Skip to:

Opened 10 years ago

Closed 10 years ago

#5574 closed enhancement (wontfix)

Tool to repare Signups for non multisite configs

Reported by: imath's profile imath Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0
Component: Core Keywords: has-patch 2nd-opinion


I had the opportunity to get a full database after a 2.0 upgrade trouble.

The problem was the activation_key meta was existing (empty or not) and this created entries in the signups table that can be confusing.

On the copy of the database, i've also noticed the signups were created 13 times. I guess the user roll back and re upgrade 13 times to be in this situation

I'm not sure it needs a dedicated repare tools but i'm also not sure it should be in an upgrade routine.

What the tool does:
It deletes all active = 0 signups when the corresponding user's status is not 2.

If the constant BP_SIGNUPS_SKIP_USER_CREATION is set i prefer to not make this tool available.

Attachments (1)

5574.patch (2.0 KB) - added by imath 10 years ago.

Download all attachments as: .zip

Change History (4)

10 years ago

#1 follow-up: @boonebgorges
10 years ago

I'm having a hard time envisioning a scenario where this kind of tool would be needed, outside of the kind of testing you're doing. Why would there be active = 0 signups for activated users?

#2 in reply to: ↑ 1 @imath
10 years ago

Replying to boonebgorges:

Why would there be active = 0 signups for activated users?

Yeah, i'm really not sure it should be a tool, that's why i asked for a second opinion.

if upgrade 2.0 went bad (existing users with activation_key) > the signups will be full of users active = 0 and user_status = 0, my idea was to only keep active = 0 and user_status = 2

Thinking of it i think this can be done from the signups management screen by batch deleting signups. Though I think there will be a trouble in one case i've seen in a real upgrade : if the activation_key is empty, then the signup will stay

#3 @imath
10 years ago

  • Milestone 2.0.1 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

That's really a bad idea, sorry i made you waste some precious time.
The logic is not good, the signup should be updated to active = 1 instead of being deleted.
With the new upgrade process in #5553 this case shouldn't happen anymore as we're regenerating the keys.

Note: See TracTickets for help on using tickets.