Forums / General / user registration: expire date?

user registration: expire date?

Author Message

Alessandro Cipriani

Monday 15 December 2003 1:48:34 am

hi all
i'm new to this forum, and i apologize if this question has already been answered: is there a way to have an expiring date when registering a new user?
in this way users can access the site only before this date, while after it the account will be disabled

thanx a lot
bisa

Gunnstein Lye

Friday 19 December 2003 8:17:41 am

No, you will have to set up this yourself. Create a date attribute in the user class, then make a cronjob script that loops through all users and checks the date. You may also want to have a disable/enable checkbox in the user class. User selfedit must be disabled, of course.

Marco Zinn

Monday 22 December 2003 11:47:59 am

Gunnstein, you talk about a cronjob.
Does this mean "programm a PHP cronjob script" or can this be done with an ez3-workflow (check for attribute and delete/remove/unpublish/change another attribute)?

Marco
http://www.hyperroad-design.com

Balazs Halasy

Monday 22 December 2003 12:04:59 pm

Gunnstein probably meant the following: create your own, custom .php file that will be run automatically every hour or so using cron. This PHP file will then have to loop through all the users within the system and for each user check the expiration date. If the date is OK, the user is left alone, if it has expired - well, then it's up to you to disable that user (or what not) from within the script.

In order for this to work, you'll have to modify the built-in user-class by adding a date field and perhaps an enabled/disabled (boolean) field to it.

(The workflow system itself usually also depends on cron.)

Balazs