phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] Question about the code of auto_add() func


From: Alex Borges
Subject: Re: [Phpgroupware-developers] Question about the code of auto_add() function in class.account_sql.inc.php
Date: Wed, 10 Dec 2003 15:33:58 -0600

Benoit:
Heyas, some things:

1.- person_id is the imported key from the phpgw_contact table that
links an account to its contact information.

2.- it is correctly updated for all functionality of accounts, except
the auto add

3.- In general, there is little harm in this because you can allways go
to edit a user that you auto_add'ed and the admin ui is built so that it
detects person_id inconsistencies and creates the contact information on
the spot (thus updating person_id correctly)

4.- Bulk account  creation and administration is more complex than they
should because account now has a link. I think also the problem is that
we have no real bulk operations for accounts (or any phpgw table) as it
is... So, the team working on syncML thought out a standarized set of
calls that will be respected throughout the api to add, delete, edit any
piece of data in phpgw. 
What im doing is using that part of the sync system for bulk accounts.

So why am i honking my own horn? For one, im shallow.  Also, i dont know
how fast do you want this, but i think that by the early next year youll
have a standard way of doing bulk operations on everything in phpgw in
production. Beta of this should have been ready last month, i think it
will be ready tomorrow (i have a terrible hang-over today).

El mié, 10-12-2003 a las 04:47, Benoit Hamet escribió:
> Hy all,
> 
> When trying to see How to create accounts directly (ie without using the admin
> interface), I have take a look at the auto_add function in
> class.account_sql.inc.php.
> 
> I use it a first time 'as-is' to see what's happen. Then I read the code, And
> I didn't understand why in my case, the person_id field is not set for an user
> account.
> If you took a look at line 413+ you will see that $acct_info contains a
> 'person_id' = NULL, and never setting back after.
> 
> If I understand, person_id is related to the contact system. So I'm obliged to
> do the following :
> 
> Create an account,
> Then create a contact with that account
> finish by updating the account with the person_id
> ?
> 
> Writing this email, I took a look at my phpgrouware_contact_person table.
> What I see, sounds strange to me. Because this install is a test plateform, I
> was obliged to create/delete/recreate accounts, without reinstalling the whole
> DB. But looking at the record in this table show me all the old entries, and
> of course, 3 to 4 times the same entries which leeds to have some entries
> modified by some id's that's no longer in use (I suppose, because my last
> admin entries is 26 and account 28 to 32 are modified by 18 which is another
> entry identified another admin entry).
> I don't know if this is normal or not, just asking for help to understand how
> this works, and so be able to build account in bulk, in a good way ...
> 
> Thanks for reading me :)
> Caeies.
> 
> 
> 
> _______________________________________________
> Phpgroupware-developers mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/phpgroupware-developers





reply via email to

[Prev in Thread] Current Thread [Next in Thread]