Forums / Developer / manditory agreements after login

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

eZ debug

Timing: Jan 20 2025 14:35:14
Script start
Timing: Jan 20 2025 14:35:14
Module start 'content'
Timing: Jan 20 2025 14:35:15
Module end 'content'
Timing: Jan 20 2025 14:35:15
Script end

Main resources:

Total runtime1.0053 sec
Peak memory usage4,096.0000 KB
Database Queries215

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 588.9609180.8281
Module start 'content' 0.00500.8918 769.7891730.2578
Module end 'content' 0.89680.1084 1,500.0469344.4297
Script end 1.0052  1,844.4766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.3941210.0002
Check MTime0.00140.1404210.0001
Mysql Total
Database connection0.00040.044510.0004
Mysqli_queries0.924291.93192150.0043
Looping result0.00200.19712130.0000
Template Total0.982097.720.4910
Template load0.00170.165720.0008
Template processing0.980497.516920.4902
Template load and register function0.00020.020910.0002
states
state_id_array0.00070.074010.0007
state_identifier_array0.00100.100620.0005
Override
Cache load0.00150.1459400.0000
Sytem overhead
Fetch class attribute can translate value0.00120.124360.0002
Fetch class attribute name0.00080.0794120.0001
XML
Image XML parsing0.00450.446060.0007
class_abstraction
Instantiating content class attribute0.00000.0022130.0000
General
dbfile0.00790.7902460.0002
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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