[horde] Store TOS information in database

Felipe Scarel fbscarel at gmail.com
Thu Sep 1 15:11:44 UTC 2011


Ok, so I've done some research and 2 things are bugging me:

- With regards to that last_logintasks line I posted earlier, which one
refers to the timestamp in which the user accepted the TOS? Also, the
timestamp format is Unix epoch, correct?
- Something weird is happening -- I'm using removeHordeUserSQL.pl to remove
users from my DB. After removing a user, the first login goes through just
fine, and only the SECOND login prompts the acceptance of the TOS? Any ideas
why that could happen?

Thanks in advance and cheers,
fbscarel

On Tue, Aug 30, 2011 at 16:29, Felipe Scarel <fbscarel at gmail.com> wrote:

> Indeed, it seems it does. I deleted my user from the DB and cleared my
> cache. Tried to log in, accepted the TOS, and went to look in the DB what
> came up in horde_prefs.last_logintasks for my user:
>
> a:2:{s:3:"imp";i:1314731781;s:5:"horde";i:1314731781;}
>
> What exactly do each of these mean? Considering one of those is the
> timestamp in which the user accepted the TOS, will it be overwritten in
> future logins (and thus needs to be saved somewhere else) or it'll stay
> there ad infinitum?
>
> Thanks for your help Michael. Cheers,
> fbscarel
>
>
> On Tue, Aug 30, 2011 at 16:07, Michael M Slusarz <slusarz at horde.org>wrote:
>
>> 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]
>>
>> --
>> Horde mailing list
>> Frequently Asked Questions: http://horde.org/faq/
>> To unsubscribe, mail: horde-unsubscribe at lists.horde.**org<horde-unsubscribe at lists.horde.org>
>>
>
>


More information about the horde mailing list