I’m just putting the finishing touches on a revamped site for a client, then they sprung something new on me [ain’t it the same old story?]
They want users to have to re-agree to the site EULA we had on the old site before they are permitted to log into the new site... I’m not sure the best way to go about this:
- Create a plugin that fires on the OnWebAuthentication system event
- check the user table to see if the logincount field is zero
- redirect them to the EULA page *
- if they agree they need to complete the login **
- if they disagree I need to make sure they can’t complete the login & that the logincount field is still zero [in case they try to log in again] ***
- if they agree and login is completed, they need to be redirected to the resource they were trying to access BEFORE they got redirected to the EULA page ****
no problems with writing the plugin or table queries, but I do have some issues I’m not sure how to approach:
* how do I redirect them and maintain all the login info without having to pass it in the URL or something, is it available in a session? [I don’t think so because I think the session is created AFTER login]
** no idea how to tell modx "yes complete the login"
*** I need to redirect them back to the original resource they were on then - no idea how to approach that.
**** basically the same as above - somehow I have to save the original resource id to be able to redirect them [there is a login callout on basically every page in addition to the actual login page]
Any thoughts or ideas are greatly appreciated.
-thanks
-sean
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525