manditory agreements after login

Author Message

Douglas Hammond

Tuesday 29 April 2008 1:24:24 pm

I have been looking through the forum for tips on how to do this.

For example periodicaly new agreements made be required to be agreeded too before doing anything after logging in.

I have found threads that mention this but no solution.

Where is the hook for me to add this?

I see in eZUserLoginHandler where $userObject = eZUserLoginHandler::instance( $handler ) is called. But if the login is successful there are no hooks for a postLogin handler or something simular.

can anyone point me in the right direction?

Maxime Thomas

Tuesday 29 April 2008 11:53:50 pm

Maybe you can use a content publish workflow on users. It will put the user in the validation mechanism.

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Douglas Hammond

Wednesday 30 April 2008 6:13:49 am

That might work but only on new users when they are created. I need it to work for all users.

Thanks for the idea.

Sébastien Antoniotti

Wednesday 30 April 2008 2:19:46 pm

Hi,

Maybe you can use the custom edit handler : http://serwatka.net/blog/ez_publish_3_8_new_custom_edit_handler

Everytime a content is created/edited, the publish() fonction will be run. So into them you can test if current object is an user and then make actions, etc.

eZ Publish Freelance
web : http://www.webaxis.fr

Bruce Morrison

Wednesday 30 April 2008 2:22:05 pm

Hi Douglas

I believe the only consistent way you will be able to achieve what you want is to modify or replace kernel/user/login.php. By replace I mean create your own in a module with a login view and override all the instances where /user/login are used in the temapltes, or maybe you can simply do an apache rewrite rule to redirect to your login.

I think I've brought it up before but the user/authentication system would benefit greatly from hooks that allowed it to be extended, also a cleaner separation of the 3 A's (Authentication, Authorisation & Access*) would allow easier integration with external systems, with each phase having pre & post hooks.

@Sébastien; The issue is not with users changing their details but forcing them to see (and possibly acknowledge ) a new set of terms & conditions when they login but before they have access to the system. My bank will often do this when there are changes to the system or T&C.

Cheers
Bruce

* From http://www.microsoft.com/technet/security/guidance/complianceandpolicies/compliance/rcguide/4-13-00.mspx?mfr=true
Authentication usually involves a user name and a password, but it can include additional methods to demonstrate identity, such as a smart card, retina scan, voice recognition, or fingerprints. Authorization focuses on determining if someone, after the person is identified, is permitted to access requested resources. Access is granted or denied depending on a wide variety of criteria, such as the network address of the client, the time of day, or the browser that the person uses.

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Sébastien Antoniotti

Thursday 01 May 2008 12:22:41 am

OK Bruce, I haven't understood the problem !

eZ Publish Freelance
web : http://www.webaxis.fr

Piotrek Karaś

Thursday 01 May 2008 1:16:30 am

<i>I think I've brought it up before but the user/authentication system would benefit greatly from hooks that allowed it to be extended, also a cleaner separation of the 3 A's (Authentication, Authorisation & Access*) would allow easier integration with external systems, with each phase having pre & post hooks.</i>

Maybe it's planned to be introduced along with Authentication component... Anyways, this would be a great to have!

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Douglas Hammond

Thursday 01 May 2008 6:00:59 am

Brice that sounds like a good idea for now.

thank you

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 20 2025 17:36:39
Script start
Timing: Jan 20 2025 17:36:39
Module start 'layout'
Timing: Jan 20 2025 17:36:39
Module start 'content'
Timing: Jan 20 2025 17:36:39
Module end 'content'
Timing: Jan 20 2025 17:36:39
Script end

Main resources:

Total runtime0.8451 sec
Peak memory usage4,096.0000 KB
Database Queries78

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 587.9219151.2109
Module start 'layout' 0.00490.0023 739.132836.6484
Module start 'content' 0.00710.8373 775.7813748.6172
Module end 'content' 0.84450.0006 1,524.398419.8438
Script end 0.8451  1,544.2422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.3595160.0002
Check MTime0.00120.1458160.0001
Mysql Total
Database connection0.00080.097310.0008
Mysqli_queries0.785792.9673780.0101
Looping result0.00070.0862760.0000
Template Total0.820197.020.4100
Template load0.00180.215920.0009
Template processing0.818296.814720.4091
Template load and register function0.00020.018210.0002
states
state_id_array0.00090.103810.0009
state_identifier_array0.00120.138820.0006
Override
Cache load0.00160.1917400.0000
Sytem overhead
Fetch class attribute can translate value0.00060.070650.0001
Fetch class attribute name0.00130.1492120.0001
XML
Image XML parsing0.00240.289450.0005
class_abstraction
Instantiating content class attribute0.00010.0060130.0000
General
dbfile0.00110.1258350.0000
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
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs