Liveuser - adding users problem

From: Date: Thu, 01 Sep 2005 10:25:34 +0000
Subject: Liveuser - adding users problem
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20712@lists.php.net to get a copy of this message
Hi, I'm trying to add a bunch of test users. I've setup Liveuser to use two auth containers, one using PEAR::Auth_Radius, one using Liveuser's Auth container with a DB backend. The ocnf array is follows: $LUOptions = array( 'login' => array(
       'force'    => true
    ),
'logout' => array(
       'destroy'  => true,
    ),
'authContainers' => array(
       'radius' => array(
           'type'  => "PEARAuth",
           'pearAuth'  => new TERENA_Auth_Radius(null, false)
       ),
       'database' => array(
           'type'            => 'DB',
           'loginTimeout'    => 0,
           'expireTime'      => 3600,
           'idleTime'        => 1800,
           'updateLastLogin' => false,
           'allowDuplicateHandles' => false,
           'allowEmptyPasswords'   => false,
           'passwordEncryptionMode' => 'PLAIN',
           'storage' => array(
               'dsn' => $dsn,
               'prefix' => 'lu_',
           ),
       ),
), 'permContainer' => array(
           'type' => 'Medium',
           'storage' => array(
               'DB' => array(
                   'dsn' => $dsn,
                   'prefix' => 'lu_',
               )
            ),
), ); $lu_admin = LiveUser_Admin::factory($LUOptions); $lu_admin->setAdminPermContainer(); $res = $lu_admin->setAdminAuthContainer('database'); With the following code I add a user. It should (and does) add the user in two containers, the Auth DB (database) container and the permission container. $user = array(); $user['handle'] = 'handle_' . substr(md5(time()), 0, 25); $user['passwd'] = 'pwd_' . substr(md5(time()), 0, 12); $lu_admin->addUser($user); To SQL inserts are performed, which is good, but the problem is that the auth_user_id in the lu_user_perm table is set to the password used in the lu_users table. Whereas it should be set the to the value of auth_user_id of the lu_users table (I think!). Any ideas? Jeroen

« previous php.pear.general (#20712) next »