[turba] Add Contacts via Script

Michael Rubinsky mrubinsk at horde.org
Tue May 26 15:22:08 UTC 2009


Quoting Jan Schneider <jan at horde.org>:

> Zitat von Michael Rubinsky <mrubinsk at horde.org>:
>
>>
>> Quoting David <david at guatcom.net>:
>>
>>> Hello;
>>>
>>> I have a registration form in another part of my site, and would like to
>>> automatically add new users' information to my address book upon
>>> registration.
>>>
>>> Looking at the mysql tables, it seems pretty straightforward; Is there
>>> any reason I *shouldn't* simply do a mysql insert with the correct data
>>> into the 'turba_objects' table?
>>>
>>> I read in some other mail that the 'object_id' and 'object_uid' fields
>>> should be unique; Are there any other stipulations or standards for the
>>> data in these fields I should adhere to?
>>
>>
>> Why not use the turba API to insert the entries? Specifically,   
>> _turba_import() in turba/lib/api.php
>
> I guess adding them directly to SQL is simpler. ;-)
> And to answer the OP question, that should work fine.

Won't that bypass the History stuff? Though I guess that's only an  
issue with Syncing?




Thanks,
mike

--
The Horde Project (www.horde.org)
mrubinsk at horde.org

"Time just hates me. That's why it made me an adult." - Josh Joplin


More information about the turba mailing list