PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Authentication » LiveUser » Bug #4898

custom field and logout weird behaviour

Details

Submitted2005-07-23 13:31 UTC
Fromtim dot daeleman at euronet dot nl
Assignedlsmith
StatusClosed
PackageLiveUser
PHP Version5.0.4
OSLinux (Kubuntu 5.04)
Roadmaps(Not assigned)

Comments

[2005-07-23 13:31 UTC] tim dot daeleman at euronet dot nl

Description:
------------
I encountered some strange behaviour since I upgraded from 0.15.1 to 0.16.2. i first thought it was my mistake. But I built a small login system from scratch, and that had the same weird behaviour. Then I decided to retry the examples.
The strange behaviour I encountered is also present in the examples, even example 1!!! So I guess something's wrong with the LU code.

I extended example 1 with 1 custom field (name) in the xml file and as follows in the config:

'storage' => array(
'file' => 'Auth_XML.xml',
'alias' => array(
'auth_user_id' => 'userId',
'passwd' => 'password',
'lastlogin' => 'lastLogin',
'is_active' => 'isActive',
'name' => 'name'
),
'tables' => array(
'users' => array(
'fields' => array(
'lastlogin' => false,
'is_active' => false,
'owner_user_id' => false,
'owner_group_id' => false,
'name' => false,
),
),
),
'fields' => array(
'lastlogin' => 'timestamp',
'is_active' => 'boolean',
'owner_user_id' => 'integer',
'owner_group_id'=> 'integer',
'name' => 'text',
)
)

I also added a $LU->getProperty('name') in the output to check if this property is retrieved correctly.

The strange behaviour occurs as follows with example 1:

0. Request example.php, result is OK, I get login box.
1. I login as e.g. father/father, result is OK: both handle and name proporty are shown.
2. I request example.php again (without form input). Result is BAD: ONLY handle property is shown, name porperty is not.
3. I press logout. result is BAD: Same behaviour as in 2., User is STILL logged in, but ONLY handle property is shown, name property is not.
4. I press logout again. result is OK. User is logged out.

I get this exact same behaviour in my LU code for the website I'm developing, and the small loginsystem I build to look for what I was doing wrong.

[2005-07-26 13:16 UTC] mz at inpoland dot pl

I can confirm this behaviour. I'm staying with 0.15.1 for now

[2005-07-26 21:38 UTC] tim dot daeleman at euronet dot nl

OK, so that will fix the custom fields property behaviour. Will it also fix the weird logout behaviour (pressing logout twice)?