Project:Terms of Use
Version:6.x-1.9
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

I'm working on a project where the Terms of Use have been updated and *all* users need to agree to the new ToU.

I preferred not to link ToU versions directly to the version of the ToU node. Making all your users accept new ToU is a pretty important step and it shouldn't just happen automatically when you update the text (maybe you're just fixing a typo).

Here's a first functional draft: note that when applying the patch, it might force all your users to re-accept the ToU, so don't try this on a live site.

What this patch does: When a user agrees to some Terms of Use, store the version (this is actually stored in the serialized data array of the user table). Then, on every page check that the accepted terms of use match the latest version (done in hook_init()), otherwise redirect to the ToU page.

AttachmentSize
terms_of_use_versions.patch5.24 KB

Comments

#1

Why check on all init not only on login?

#2

@gagarine: There's two reasons to check on all page load:

1. To force users to agree to the new terms of use. Otherwise they could simply ignore the terms of use and go to a different page.
2. Drupal by default has very long sessions, meaning that users don't get logged out for a long time. You might need to have your users accept the terms of use even if they're already logged in.

The second point is secondary, but we do need to have a check on every page load. The check itself isn't very expensive, it doesn't require any additional query since variables and the user object are already loaded anyway.

#3

I like the idea of the patch and it makes ToU a solution for a few sites I maintain. Checking every page would create a problem for people in the middle of a multipage form or concentrating on editing content. All my sites can live with accepting a term change when people log back in the next day. Perhaps a future enhancement can be to lock the acceptance into the login.

#4

subscribe

#5

Just to let people know - I included this feature in a combined patch #759064: Combined patch to address multiple issues and feature requests

#6

Status:needs review» needs work

There are some codingstyle issue with the patch.

And I have some thoughts about this.
What if there are multiple terms pages? How do I agree to them?
Maybe there should be a TOU section on each node/edit form so we can select the node for TOU use and set it to "Must be agreed before the site is usable again".
Maybe there should be more escalation steps of how far we bug the users to agree to our terms?

#7

subscribe

#8

meanwhile people can do this with Actions and Triggers (send mail when a particular content is changed)

it doesn't requires checking the box again, but informs users by mail.

#9

Will the patch be ported to 7.x ?

#10

At cocomore codesprint we basically decided to do a more complex rewrite but I fear its at stalmate...