more than one table to check user

andi <[email protected]> Sat, 22 Oct 2005 10:34:31 +0200
Newsgroups gmane.comp.php.pear.liveuser
Message-ID <[email protected]>
hello all,

i'm very amazed by your pice of software, even if it was a pretty hard 
act to customize liveuser/liveuser_admin to me. nevertheless...

the question i was working for the last two days is to identify a user 
against more than one table. i can imagine, that it will be possible 
very easy, but i was just too stupid to see the solution. my aim is to 
identify a user via its email and a unique tan, which is not located in 
the usertable. i tried something like that, but if i define a field for 
password that is not in the usertable, it won't work. also the field 
'tan' (located at the bottom) is not requested by default, although it 
is set to required... ?

        'storage' => array(
          'connection' => null,            // this field will be filled 
by the user class with a valid connection
          'prefix' => 'tbl_',
          'alias' => array(
            'users' => 'user_detail',
                        'user_tan_realm' => 'user_tan_realm',
                        'user' => 'user',
            'auth_user_id' => 'user_id',
            'handle' =>       'email',
            'passwd' =>       'email',
            'tan' =>       'tan',
            'lastlogin' =>    'last_login',
            'is_active' =>    'active'
            ),
          'fields' => array(
            'lastlogin' => 'timestamp',
            'is_active' => 'integer',
            'owner_user_id' => 'integer',
            'owner_group_id' => 'integer',
            'email' => 'text',
            'tan' => 'text',
            ),
          // defines 'required' state of a column [boolean]
          'tables' => array(  
            'users' => array(
              'fields' => array(
                  'handle' => true
                ),
              ),
            'user' => array(
              'fields' => array(
                'lastlogin' => false,
                'is_active' => false,
                )
              ),
            'user_tan_realm' => array(
              'fields' => array(
                  'tan' => true
                )
              )
            ),


i would be very thankful for any good hint :)

best, andi