[horde] Store TOS information in database

Michael M Slusarz slusarz at horde.org
Tue Aug 30 19:07:40 UTC 2011


Quoting Felipe Scarel <fbscarel at gmail.com>:

> Hey there guys,
>
> I'm configuring a Horde installation for my employer and have stumbled upon
> a problem. I'm using the TOS Agreement feature from Horde to display a TOS
> to my users, and only let them log in if accepted. To achieve that I'm using
> the 'imap' auth driver directly in Horde, and 'hordeauth = true' in IMP.
> Users are logging in just fine, and the TOS works as intended.
>
> I don't know that much PHP, but what I've understood from
> 'lib/LoginTasks/Task/TosAgreement.php' is that it checks for the acceptance
> of the TOS somewhere in client-side (using 'Horde_Util::getFormData', I
> think). That seems to be the case, since I ran some tests and, after
> clearing browser cache, the TOS shows up again for a user that had accepted
> it in the past.
>
> My question is: I'd like to store the TOS acceptance in the Horde MySQL
> database (or the LDAP db against which my IMAP auths are checked, either is
> fine), preferably as a timestamp registering when the user accepted the TOS.
> Is there any easy/standard way of doing that in Horde, or I'd have to go
> about changing 'lib/LoginTasks/Task/TosAgreement.php'? If changes are
> needed, would they persist through upgrades?
>
> Oh yes, and I'm running the most recent Horde release... just ran a 'pear
> upgrade' on my server.

The last_logintasks preference for a user contains an array of  
timestamps of the last time a login task was run (key is the task's  
PHP classname I believe).  So this data should already exist.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the horde mailing list