1
marckd
how could I resolve this user issue I want to do?
  • 2008/10/2 16:27

  • marckd

  • Just popping in

  • Posts: 86

  • Since: 2006/3/16


hello

I am building a module for my own usage, but I have a question that is in my mind and don't know how to resolve it yet...

I want to have three kind of registered users (beside admin)
user A
user B
and user paid-A

users will have to register chosing one of A or B, but when chosing A, they will be in fact a paid-A for a week
this is to show them how the site works and things like that... after this week, I want to automatically disable their accounts, making it a user A, without paiments, so they will only be able to see a very few things on the site, unless they pay and become a paid-A
users B will have access to other parts of the module

but I don't know how will be the easiest way on doing this

what can you suggest me?

hope I have explained my idea correctly, but my english is not very good, so no problem on reasking me something!

thanks for your help! :)

2
trabis
Re: how could I resolve this user issue I want to do?
  • 2008/10/2 22:39

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Best way is to have a paid-A group and a trial-A group that is equal to paid-A (same permissions)

This way you can add in the registering process an user to trial-A group.

Each time a user login you can check the register date against the current date and if the difference is more than 30 days you just remove the user from the trial-A group.

If meanwhile the user has already upgraded to paid-A, deleting him from trial will not make difference to him.

This way you will not need to create extra table. 5 or 6 lines of code will do it.

3
marckd
Re: how could I resolve this user issue I want to do?
  • 2008/10/3 18:45

  • marckd

  • Just popping in

  • Posts: 86

  • Since: 2006/3/16


very nice! thank you :)

and how do I resolve the type of user in the registration? (chosing between trial-A or B)

thanks again!

4
marckd
Re: how could I resolve this user issue I want to do?
  • 2008/10/3 19:59

  • marckd

  • Just popping in

  • Posts: 86

  • Since: 2006/3/16


never mind! just did it gathering some posts in the forum! :)

thanks

Login

Who's Online

201 user(s) are online (109 user(s) are browsing Support Forums)


Members: 0


Guests: 201


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits