I'm not sure if this is a full-blown bug, but I think that this is fairly important so I thought I'd submit it and post a patch.

After the user successfully registers using a valid registration code, after some time goes by the site admin might decide to change the valid registration codes. When this happens, any user who tries to edit their account info will be told that they entered an "Invalid Registration Code". This is bad. First, when the user registered, they had a correct registration code so they should be good to go. Second, there isn't even a registration code input box on the edit form, so the user will be confused.

Anyway, it's an easy fix - just check for the existence of a uid before validation. A patch is attached.

-mike

CommentFileSizeAuthor
regcode_validate.patch611 bytesultimike

Comments

colan’s picture

Title: updating user account shouldn't require current registration code » Updating user account shouldn't require current registration code
Status: Active » Needs review

Thanks! Hopefully I or someone else will get a chance to review it soon.

Herbt’s picture

I added the patch to a sandbox install of the current dev and so far no problems. Will be testing it more in the next few days.

d------’s picture

I have also tested and put the code live on some live and running installs. The patch works great... can we add it to 5.x stable release?

colan’s picture

Assigned: ultimike » colan
Status: Needs review » Reviewed & tested by the community

I'll try to get this in soon and then post a new release. Thanks!

Bassel’s picture

Status: Reviewed & tested by the community » Active

I hope we are close to have a new release of this module which fixes this problem.

Thanx in advance.

colan’s picture

Status: Active » Reviewed & tested by the community

Just setting this back to where it should be. I'll try to get this in by the end of the year. I think I need a co-maintainer. ;) Busy, busy, busy...

colan’s picture

Marking http://drupal.org/node/168979 as a duplicate of this ticket.

mlissner’s picture

Can somebody explain how to apply this patch? I'm having this exact problem and know nothing of patch application.

Thanks.

colan’s picture

Status: Reviewed & tested by the community » Fixed

Please try the new release. I just created it a few minutes ago.

colan’s picture

Sorry, I forgot the link. That new release would be 5.x-2.0.

mlissner’s picture

You'll have to forgive my ignorance, but how does one go about using that new version you just posted? Is that a new version of the patch, or a new version of the module?

I'm sorry...I'm a bit new at this whole thing.

mlissner’s picture

Scratch that last post. I just needed to install the new version. Works like a charm, thanks.

Bassel’s picture

Many thanx for the update. I have tried it and it works fine with me.

Anonymous’s picture

Status: Fixed » Closed (fixed)