Is it possible to provide / authenticate a reg code after a user already is registered? (maybe I'm missing it, but did not find a way)

Thanks for the promising module, appreciated!

Comments

aidanlis’s picture

Hi,

No, this feature isn't supported. I'm not sure what the use-case would be, could you elaborate?

Abilnet’s picture

This feature could potentially open quite a many new possibilities for "regcode" to use. For example, someone gets a physical ID-card, VIP-card or whatever form of unique numbers... then he goes to a web site to type in the number of his card... and bang, after matching the code, "rules" will kick in to give him an additional user profile or what ever actions (if he does not have an account yet, he just register a new one and provide his code during registration - or afterwards inside their profile... same results)

So, this could extend "regcode" functionality from just verifying if a user is allowed to register or not - to an elegant code verification system with virtually unlimited possibilities.

Thanks for considering this.

shunshifu’s picture

subscribing

I need a model which will upgrade the user to a role like in promo code. This module seems like the most likely choice

aidanlis’s picture

Okay, I can see the use for this ... How would the regcode be entered if the user already had an account? Via a tab in their profile, or through a special page that you'd direct them to?

I'll make this as a submodule, I guess called regcode_voucher, which will ship with the regcode module.

Abilnet’s picture

Hey this is really cool news! For me it seems natural, if they'll type their code in their profile page when logged in. However, some special page is also cool... what ever makes more sense. Thanks again considering this, your hard work appreciated!

aidanlis’s picture

All done and tested. Can you download the development version (should be available in the next 24 hours) and let me know if any improvements are needed?

aidanlis’s picture

Status: Active » Fixed
Abilnet’s picture

Thanks for the new feature, appreciated! However, when enabling all the registration modules, I got the following errors:

* warning: Invalid argument supplied for foreach() in /home/xxx/public_html/includes/database.mysql-common.inc on line 109.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT NULL, PRIMARY KEY (id), UNIQUE KEY 0 () ) /*!40100 DEFAULT CHARACTER S' at line 5 query: CREATE TABLE regcode_mailer ( `id` INT unsigned NOT NULL auto_increment, `rid` INT unsigned DEFAULT NULL, `mailed` DATETIME DEFAULT NULL, `recipient` DEFAULT NULL, PRIMARY KEY (id), UNIQUE KEY 0 () ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/xxx/public_html/includes/database.inc on line 529.

I'm on Linux server with PHP: 5.2.6 and MySQL: 5.0.67

Abilnet’s picture

Also I found that the feature: Clean: Erases *all* existing codes before importing new codes. does actually not clear the old values when importing a new list of codes. Instead, I'd end up to an error message:

user warning: Duplicate entry '2548737081649930' for key 2 query: INSERT INTO regcode (created,begins,expires,category,code,is_active,maxuses) VALUES (NOW(), NULL, NULL, 'default', '2548737081649930', 1, 1) in /home/xxx/public_html/sites/all/modules/regcode/regcode.api.php on line 141.

One more... I have the Make registration code optional checked, but when editing my profile, reg.code field seems to be required.

Just for brainstorming... there's a Coupon project which is not an active one, but listing some interesting possibilities, I think.

Once again, thanks so much for creating this great module. Even if some fine tuning needed with the new features, your work definitely opens a lot of great possibilities!

aidanlis’s picture

#8: Ooops, forgot to give it a length. This should now be fixed.

#9: a) I've added in the clean functionality, it went missing somehow. b) there was a language issue, it was meant to say required not optional. I've fixed this now and ensured that regcode is always optional as a voucher.

I like ilo's idea with the Coupon project, it looks like it would be useful, but it's an ambitious project and I'm pretty flat out just maintaining my modules.

Thanks for finding all these bugs and getting the module polished up. I'll release a new version today, as I think everything is looking pretty good!

Abilnet’s picture

wow! ...what can I say... thanks soo much aidanlis, your hard work highly appreciated! ...where's your donate-link? I want to make sure you'll have a piza to eat and beer to drink!

aidanlis’s picture

Thanks Abilnet, that would be much appreciated, but no obligation!

http://aidanlister.com/donate

Abilnet’s picture

Enjoy your piza & beer ;)

aidanlis’s picture

I can't tell you how great it makes me feel to receive such a generous donation! Thank you very much.

aidanlis’s picture

Status: Fixed » Closed (fixed)