User Log In checked with Expiry date

Author Message

Trevor Clowry

Tuesday 12 April 2005 7:07:29 am

I have a modified content class called "User" in the Users class group list.
The User class has an attribute "expiry date" and the idea is that if the expiry date is less than the current date, then the user can't log in. This is not implemented yet though.
I haven't created this site myself and im just wondering if anyone can guide me in the right direction on how to implement this.
For example, the form that the user uses to log in points to "users/login".
I have looked for the code that does the login script but have been unsuccessful so far. Is it in the kernel folder?

Sebastiaan van der Vliet

Wednesday 13 April 2005 1:16:45 am

Hi Trevor,

I think you don't have to modify the kernel to implement an expiry date on users. If you use the attribute identifier "unpublish_date" for the attribute with the name "Expiry date", I think it might be possible to use the unpublish cronjob script to disable users.

Cheers,
Sebastiaan

Certified eZ publish developer with over 9 years of eZ publish experience. Available for challenging eZ publish projects as a technical consultant, project manager, trouble shooter or strategic advisor.

Petter Arneson

Friday 03 February 2006 4:35:32 am

Did anyone implement this?

It sounds like a good suggestion, and exactly what we need for a new site.

If someone who have done this could give any pointers we would appreciate it..

www.vzt.no

Petter Arneson

Tuesday 07 February 2006 4:29:09 am

Hi!

I tried implementing this as suggested on a 3.6.0 site,
for deleting users after a given time (subscription):

- Added an attribute in user class with identifier "unpublish_date", of datatype "date and time".
- Filled the attribute with a time, e.g this morning.
- Added settings in settings/override/content.ini.append.php

[UnpublishSettings]
RootNodeList[]=5
ClassList[]
ClassList[]=4

- Added a workflow, "wait until date", for the unpublish_attribute...(altough I cant see why)
- Run cronjob manually on server, and it executed unpublish.php with no error.

But the user that should be deleted is still there, and is able to log in.
I would appreciate any hints!
- Thanks

www.vzt.no

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 18 2025 18:14:13
Script start
Timing: Jan 18 2025 18:14:13
Module start 'layout'
Timing: Jan 18 2025 18:14:13
Module start 'content'
Timing: Jan 18 2025 18:14:14
Module end 'content'
Timing: Jan 18 2025 18:14:14
Script end

Main resources:

Total runtime1.0077 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 589.0547152.6250
Module start 'layout' 0.00680.0027 741.679739.4453
Module start 'content' 0.00950.9969 781.1250587.5078
Module end 'content' 1.00640.0012 1,368.632812.1563
Script end 1.0077  1,380.7891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3190160.0002
Check MTime0.00130.1333160.0001
Mysql Total
Database connection0.00080.077710.0008
Mysqli_queries0.955794.8404620.0154
Looping result0.00060.0589600.0000
Template Total0.976196.920.4880
Template load0.00190.185420.0009
Template processing0.974296.672820.4871
Template load and register function0.00020.018810.0002
states
state_id_array0.00130.124510.0013
state_identifier_array0.00090.087920.0004
Override
Cache load0.00150.1532310.0000
Sytem overhead
Fetch class attribute can translate value0.00080.075730.0003
Fetch class attribute name0.00150.144950.0003
XML
Image XML parsing0.00090.089130.0003
class_abstraction
Instantiating content class attribute0.00000.001250.0000
General
dbfile0.00190.1927170.0001
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 23
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs