MySQL and owner_id field

M Z Rahman zrahman@partex.net
Tue, 16 Oct 2001 20:11:37 +0000


Hi,

When I converted my old IMP address book table (imp_addr) to the new 
turba_objects, I marked that the new turba_objects table owner_id field does not
add it as "userid@domain", rather it adds as only the "userid". But, when I 
change the owner_id from only "userid" to "userid@domain", it doesn't even show 
the entry in the address book of the user. 

Now, the problem: just to test, I changed my second IMP server's turba Mysql 
settings to my other IMP server instead of the local mysql server. And, I added 
permissions in the 1st server's mysql, so that the 2nd server can change the 
horde database. It worked perfectly, but it did not show any entry that was 
already there in the 1st server and when I added an entry it added the owner_id 
field as userid@domain format. By the way, I was logged into my 1st server from 
my 2nd server's IMP using IMP's servers.php setting.

An example to visualize it more:

Here's a normal entry from 1st IMP server logged in as zia locally:
4fc0fac7a22908b9ae49322c32c4bd92 zia nicky   nicky@dhakacom.com 

Here's the problem entry from the 2nd server logged in as zia to the 1st server:
4628b41f7597f5e508fca6c4d5785afb zia@partex.net nick   nick@hotmail.com

As theres no entry for user zia as userid@domain (zia@partex.net) in the 
owner_id filed, turba is unable show the existing entries.

The question: I digged up the code and found when adding to the databse turba 
gets the owner_id from Auth::getAuth():

return $driver->addObject(array('name' => $name, 'email' => $address, '__owner' 
=> Auth::getAuth()));

and, probably this [Auth::getAuth()] adds the ower_id as userid@domain while 
adding and even when searching for addresses.

Is it possible to change this only to "userid", so that turba will also get the 
existing entries and when adding adds only "userid" in the field ower_id?

Regards,

Zia