Hi there,

I was hoping this module would allow me to set a specific expiry period for each code, but it appears it only allows me to set a specific date.

I would like to generate a set of codes, which when used to register on my website, would grant the user for example 6 months access to the support section from the date of registration. Since my business is primarily personal interaction, my plan would be to generate a batch of codes and have them printed onto cards, that I would then sell to customers I already have contact with for extra support when I'm not with them. I also had the idea of putting codes onto the back of some business cards that activates a free trial period of say 14 days.

If you would consider adding this to the list of features you will implement in the near future that would be much appreciated

Adam Farden
adam@farden.cz
www.farden.cz

Comments

aidanlis’s picture

Priority: Normal » Minor

Hi, unless you want to sponsor the development this is a very low priority, but thanks for the idea.

adfad666’s picture

After a bit of further research it seems most of what I need could be handled by the Role Expire module http://drupal.org/project/role_expire because as far as I can tell the expiry function of this module concerns the codes only, and once the role is added to the user, that's it (however please correct me if I'm wrong!)

The Role Expire module can assign a default expiry time to each role, so whenever a role is added to a user, it will automatically be removed from the user after that set ammount of time.

Therefore, it should (hopefully) be a fairly easy task to make this module aware of the Role Expire module, so if it detects a default expiry time for a role it is about to assign, it can then add the correct expiry dates etc. to the role, which then gets handled by the Role Expiry modue.

After that it would be a trivial matter of generating a set of codes without an expiry date set by this module and, whether they are used now or some time in the future, they will always be valid for the same ammount of time.

If you could have a quick look to see if it's easily doable, I'd probably be willing to make a donation.

Adam Farden
adam@farden.cz
www.farden.cz

aidanlis’s picture

Hi Adam,

I've investigated this and although theoretically it should work like exactly like you want, there's a bug in the role_expire module which prevents it from working, #608312: Role expiration isn't set during admin user add/create, only during edit..

Once the bug is fixed you'll be able to install the role_expire module and have a set up as you've described.

Cheers and sorry for the delay,
Aidan

aidanlis’s picture

Status: Active » Fixed
adfad666’s picture

Hi Aidan,

Thank you for investigating this, looks like I'll have to go pester the Role Expire developers now!

Adam Farden
adam@farden.cz
www.farden.cz

aidanlis’s picture

Status: Fixed » Active

I tried out their role_expire module with the patch and it doesn't work ... I've had a look around the source and it's not a simple change.

Are you interested in supporting the further development of the regcode_roles submodule to provide support for expiration periods and fixed expiration dates?

aidanlis’s picture

Hi Adam,

The latest version of regcode has all the functionality for role expiring that you might need. Give it a test and let me know.

Cheers,
Aidan

aidanlis’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.