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.