[imp] Re: Using hook to copy Squirrelmail to Turba on first login?

Kevin Konowalec kevin at ualberta.net
Tue Apr 19 07:58:00 PDT 2005


This looks like it'd be very handy for something I'm working on too.  
Can you install this task when there are already defined users and have 
it run on their next login if certain conditions are met?



On Apr 19, 2005, at 8:25 AM, Josh Trutwin wrote:

> On Tue, 19 Apr 2005 14:46:33 +0200
> Jan Schneider <jan at horde.org> wrote:
>
>> Zitat von Josh Trutwin <josh at trutwins.homeip.net>:
>>
>>> I have some MySQL code that copies a user's SquirrelMail
>>> addressbook into the Turba tables (both are using a MySQL
>>> backend).  I'm working on a migration plan from SquirrelMail to
>>> Horde3/Imp4 and what I'd like to do is use the
>>> _horde_hook_postauthenticate hook to run this code on the user's
>>> first login to Imp.  The only thing I'm not sure of is how to tell
>>> whether or not it's the user's first login.  It must be possible
>>> since it shows the Last Login each time anyone logs in.  Any
>>> thoughts?  Here's what I'm attempting to do with the hook:
>>
>> Use a custom TOS maintenance task instead, these are automatically
>> run  on first login only.
>
> Thanks, looks like I can model after
> imp/lib/Maintenance/Task/tos_agreement.php - would I need to add a new
> pref as well, like how $_prefs['tos_agreement'] works:
>
> // import SM addressbook on first login?
> // a value of 0 = no, 1 = yes
> $_prefs['import_sm_addressbook'] = array(
>     'value' => 1,
>     'locked' => true,
>     'shared' => false,
>     'type' => 'implicit');
>
> Thanks,
>
> Josh
> -- 
> IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe at lists.horde.org
>



More information about the imp mailing list