Re: Custom fields totally changed??

Tim Daeleman <[email protected]>
Newsgroups gmane.comp.php.pear.liveuser
Message-ID <[email protected]>
Hi,

Damnit, I start to get really frustrated about this BC break!!
I get basic login working with 0.16.2 now. In the same page request 
where the actual initial login happens all custom fields can be 
retrieved with the getProperty method (and they are present in the LU 
object).

["ownerGroupid"]=>
     string(0) ""
     ["last_name"]=>
     string(8) "Daeleman"
     ["first_name"]=>
     string(3) "Tim"
     ["organisation_name"]=>
     string(5) "Kagan"
     ["email_address"]=>
     string(27) "[email protected]"
     ["extra_email_address"]=>
     string(0) ""
     ["website_url"]=>
     string(21) "http://www.xxxxxxxxxx.net"
     ["address"]=>
     string(9) "xxxxxxxx"
     ["zipcode"]=>
     string(0) ""
     ["city"]=>
     string(8) "xxxxxxxx"
     ["country"]=>
     string(9) "xxxxxxxxxx"
     ["phone"]=>
     string(0) ""

When I reload the page (and an actual login isn't required anymore 
because of the fact that the user is logged in) these custom fields 
aren't to be retrieved anymore and also the LU object doesn't have them 
anymore.

Maybe this gives an explanation (part of the LU object):
["storedExternalValues"]=>
     NULL

So when calling LU->init WITH login data it works and calling the method 
without the login data, just regenerates a "light" version of the LU 
object which detects the user being logged in, but doesn't find the 
custom fields
I tried many thins such as the regenid and autoinit  to correct it, but 
to no avail.

Also logging out acts strange. I have to do it twice. When calling the 
logout url blabla.php?logout=true, for the first time keeps the user 
logged in (with this "light" version of the LU object), calling the 
logout url for the second time eventually results in the desired logout.

My config:

$conf = array(
	'login' => array(
         'force'    => true,
      ),
      'logout' => array(
         'destroy'  => true,
      ),
      'cookie' => array(
         'name'     => 'dontForget', //'Name of Remember Me cookie'
         'lifetime' => 14,
         'path'     => null,
         'domain'   => null,
         'secret'   => 'ditiswatin4f5oomd6ek',
         'secure'   => false,
         'savedir'  => LU_COOKIE_DIR
      ),
      'authContainers' => array(
         array(
	    	'type'          => 'DB',
             'loginTimeout'  => 0,
             'expireTime'    => 3600,
             'idleTime'      => 1800,
             'updateLastLogin' => true,
       		'allowDuplicateHandles' => false,
             'allowEmptyPasswords'   => false,
             'storage' => array(
             	'dsn' => DSN,
             	'prefix' => 'liveuser_',
                 'tables' => array(
                 	'users' => array(
                     	'fields' => array(
                         	'lastlogin'         => false,
                         	'is_active'         => false,
                         	'owner_user_id'     => false,
                         	'owner_group_id'     => false,
                     		'last_name'  => false,
                     		'first_name'  => false,
                     		'organisation_name'  => false,
                     		'email_address'  => false,
                     		'extra_email_address'  => false,
                     		'website_url'  => false,
                     		'address'  => false,
                     		'zipcode'  => false,
                     		'city'  => false,
                     		'country'  => false,
                     		'phone'  => false
                             ),
                         ),
                     ),
                     'fields' => array(
                         'lastlogin'         => 'timestamp',
                         'is_active'         => 'boolean',
                         'owner_user_id' => 'integer',
                 		'owner_group_id'=> 'integer',
                 		'last_name'  => 'text',
                     	'first_name'  => 'text',
                     	'organisation_name'  => 'text',
                     	'email_address'  => 'text',
                     	'extra_email_address'  => 'text',
                     	'website_url'  => 'text',
                     	'address'  => 'text',
                     	'zipcode'  => 'text',
                     	'city'  => 'text',
                     	'country'  => 'text',
                     	'phone'  => 'text'
                     ),
                     'alias' => array(
                         'auth_user_id' => 'authUserId',
                         'handle' => 'handle',
                         'passwd' => 'passwd',
                     	'lastlogin' => 'lastLogin',
                     	'is_active' => 'isActive',
                     	'owner_user_id' => 'owner_user_id',
                     	'owner_group_id' => 'owner_group_id',
                     	'last_name'  => 'last_name',
                     	'first_name'  => 'first_name',
                     	'organisation_name'  => 'organisation_name',
                     	'email_address'  => 'email_address',
                     	'extra_email_address'  => 'extra_email_address',
                     	'website_url'  => 'website_url',
                     	'address'  => 'address',
                     	'zipcode'  => 'zipcode',
                     	'city'  => 'city',
                     	'country'  => 'country',
                     	'phone'  => 'phone'
                     ),
                     // 'force_seq' => false
                 ),
             )
         ),
         'permContainer'  => array(
                             'type'  => 'Medium',
                             'storage' => array(
                             	'MDB' => array(
                             		'dsn' => DSN,
                             		'prefix'     => 'liveuser_'
                             		)
                             	),
                         )
         );


thx again!!!

-- 
Tim Daeleman                  [email protected]
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.