Sign agreement when joining or logging in first time [SOLVED]

I want the users to sign an (GDPR) agreement when the join.
(Or better: the first time they sign in).

Also, it would be nice if users are asked to check / update their contact info (etc) a certain intervals ( 6–12 months). Is there a 'not too complicated way of doing that).

Does anyone have good advice?
The site will be 'quite basic', just a few add-ons, and 100 users.

We have done this adding a viewlet and checking there your requirements. If the requirements are not met you can redirect the user to a page where you present the form or whatever you need.

So you have a viewlet that shows every time a user logs in or a viewlet that redirects to 'settings' ?

I would prefer to have a pop-up or similar instead of being redirected (although it is not too important)

We have a viewlet that is rendered always, does the check and if the requirements are not met redirects the user.

If you prefer a popup, the viewlet can render js code to render the popup when the requeriments are not met.

Maybe (untested… it is 23:26 now)

<a href="${portal_url}/@@user-information?userid=${getMyID}" class="pat-plone-modal" data-pat-plone-modal="width: 80%">Update your settings</a>


Super, thanks

I know there is a 'last login setting somewhere', but I assume the last login is 'today' of one just logged in.

Is there a way to get the 'previous' login?

So I could do a check if previous login < datetime.datetime.today() - datetime.timedelta(180) then show 'time to check your settings' ?

… or should I add a new (hidden) field for users and check and save this from the viewlet ?

AFAIK the last login data is not reliable. I would store it somewhere, maybe at the user data.

Instead of having a viewlet that checks on every request, I would use https://github.com/plone/plone.login and redirect the user after login.

I changed the messages to be able to use html.
Then I used plone.login to add an adapter as you suggested.
This lets me show a 'form' on login without the need to redirect.
From a UI perspective, I am very happy with this.

One note: Status message with links

If it should be of interest to anyone, every 6 months you get this: https://youtu.be/MgfnadpAzGA

Plone Foundation Code of Conduct