Re: Custom fields totally changed??

Jens Kleikamp <lists.jens-z4600/[email protected]>
Newsgroups gmane.comp.php.pear.liveuser
Organization codes & concepts
Message-ID <[email protected]>
Tim Daeleman wrote:

> Hi,
>
> I just updated to 0.16.2 from 0.15.x. Apparently the whole custom 
> fields mechanism has changed. I got a whole website running with them, 
> seems I have to change a lot now, I suppose the whole array that gets 
> returned with the getUsers methods will be different too.
>
> Is there any documentation what changed and how it works now. Just the 
> config array layout doesn't give me any clue. What do the alias, 
> fields and tables subarrays do and where go the original 
> 'optional_fields' and custom_fields sub arrays from version 0.15??
>
> All these nested arrays are chinese to me

Hi Tim,

I was in the same boat as you are, I think. I use many custom/optional 
fieds and after the upgrade from 0.15.x to 0.16.2 I spent a lot of time 
to figure out how the new version deals with them.
In the end, now I have the following crazy looking authContainerConfig 
which seems to work very well :

'authContainers' => array(
    'DB' => array(
        'type'            => 'MDB2',
        'loginTimeout'    => 0,
        'expireTime'    => 3600,
        'idleTime'        => 1800,
        'allowDuplicateHandles' => 0,
        'storage' => array(
            'dsn' => '',
            'alias' => array(
                'auth_user_id'         => 'auth_user_id',
                'last_login'         => 'last_Login',
                'is_active'         => 'is_active',
                'owner_user_id'     => 'owner_user_id',
                'owner_group_id'     => 'owner_group_id',
                'cDate'              => 'cDate',
                'mDate'              => 'mDate',
                'fname'              => 'fname',
                'name'                 => 'name',
                'gender'             => 'gender',
                'company'             => 'company',
                'department'        => 'department',
                'street'             => 'street',
                'postcode'             => 'postcode',
                'city'                 => 'city',
                'country'             => 'country',
                'phone'             => 'phone',
                'fax'                 => 'fax',
                'email'             => 'email',
                'website'             => 'website',                       
            ),
            'fields' => array(
                'last_login'     => 'timestamp',
                'is_active'     => 'boolean',
                'owner_user_id' => 'integer',
                'owner_group_id'=> 'integer',
                'cDate'          => 'timestamp',
                'mDate'          => 'timestamp',
                'fname'          => 'text',
                'name'             => 'text',
                'gender'         => 'text',
                'company'         => 'text',
                'department'    => 'text',
                'street'         => 'text',
                'postcode'         => 'text',
                'city'             => 'text',
                'country'         => 'text',
                'phone'         => 'text',
                'fax'             => 'text',
                'email'         => 'text',
                'website'         => 'text',
            ),
            'tables' => array(
                'users' => array(
                    'fields' => array(
                        'last_login'         => false,
                        'is_active'         => false,
                        'owner_user_id'     => false,
                        'owner_group_id'     => false,
                        'cDate'              => false,
                        'mDate'              => false,
                        'fname'              => false,
                        'name'                 => false,
                        'gender'             => fal,
                        'company'             => false,
                        'department'        => false,
                        'street'             => false,
                        'postcode'             => false,
                        'city'                 => false,
                        'country'             => false,
                        'phone'             => false,
                        'fax'                 => false,
                        'email'             => false,
                        'website'             => false,
                    ),
                ),
            ),
            'force_seq' => false
        ),
    )
)

Hope that helps....
Jens
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.