I'm new to Drupal and am working on a project for a client who for some reason would like to require the user to accept the Terms & Conditions every time they login, instead of only when changes have been made. Which file(s)/line(s) of code should I edit in order to accomplish this change?

Comments

stephaniepotter created an issue. See original summary.

stephaniepotter’s picture

Issue summary: View changes
Dev1.addweb’s picture

StatusFileSize
new1.17 KB

PFA patch which works well!

Dev1.addweb’s picture

Status: Active » Needs review
abarpetia’s picture

Status: Needs review » Reviewed & tested by the community

Great patch! I verified that it worked, and I would recommend to commit it.

Dev1.addweb’s picture

Thanks Abarpetia!

abarpetia’s picture

Status: Reviewed & tested by the community » Needs work

Sorry, changing status back to "need work". Currently, this patch forcing all users to accept T&C every time they login. This may not be the case for all other users.

It will be worth of having some way to disable this feature. May be a checkbox on module's configuration page.

Dev1.addweb’s picture

StatusFileSize
new3.71 KB
new27.91 KB
new25.36 KB

Added checkbox on modules configuration page to enable/disable the feature to accept T&C every time user login.

PFA patch "accept_terms_on_every-2757535-8.patch"

Dev1.addweb’s picture

Status: Needs work » Needs review
abarpetia’s picture

Version: 7.x-1.5 » 7.x-1.x-dev
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new3.41 KB

Thanks for the new patch.

I have tested attached #8 patch on fresh installation and it's perfectly worked for me. Just re-rolled against dev branch (Do not include me in credits)

+1 to commit.

abarpetia’s picture

Priority: Critical » Normal
Dev1.addweb’s picture

@Robert: Please take a pull and commit the patch. Would be awaiting for credit.

  • Robert Castelo committed ecaa493 on 7.x-1.x
    Issue #2757535 by Deepali.addweb: Accept Terms on Every Login
    
robert castelo’s picture

Status: Reviewed & tested by the community » Fixed

Released in Legal 7.x-1.6

Thanks for the patches Deepali Agarwal, and for reviewing and re-rolling Aniket Barpetia.

I made a few changes:

* Moved option to a Legal Configuration page so that these kind of option can be enabled/disabled without having to create a new T&Cs revision

* Added t() for translation of strings

* Removed unused rendering of form elements

* Ammended logic to make it a bit clearer

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.