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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 04:35:12
Script start
Timing: Jan 31 2025 04:35:12
Module start 'layout'
Timing: Jan 31 2025 04:35:12
Module start 'content'
Timing: Jan 31 2025 04:35:12
Module end 'content'
Timing: Jan 31 2025 04:35:12
Script end

Main resources:

Total runtime0.0181 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 588.1250151.2109
Module start 'layout' 0.00620.0041 739.335936.6484
Module start 'content' 0.01030.0063 775.984494.1094
Module end 'content' 0.01660.0015 870.093833.9922
Script end 0.0181  904.0859 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002815.6142140.0002
Check MTime0.00126.5833140.0001
Mysql Total
Database connection0.00105.335110.0010
Mysqli_queries0.003117.229830.0010
Looping result0.00000.136910.0000
Template Total0.00105.710.0010
Template load0.00084.672810.0008
Template processing0.00021.021710.0002
Override
Cache load0.00063.262710.0006
General
dbfile0.00179.279880.0002
String conversion0.00000.055340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs