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

Jan Schneider jan at horde.org
Thu Apr 21 01:08:06 PDT 2005


Zitat von Josh Trutwin <josh at trutwins.homeip.net>:

> On Tue, 19 Apr 2005 18:55:43 +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.
>>
>> It would be great if you could contribute the maintenance and import
>> code btw.
>
> Is there an elegant way to make a maintenance task conditional?  I was
> going to try to query the Squirrelmail db to see if there were any
> addressbook entries, if not, skip the maintenance task.  I had some
> conditional code in the describeMaintenance() method of the task, but
> this is too late it seems.

No, I don't think this is possible out-of-the-box at the moment.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/


More information about the imp mailing list