Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.16.14

Bug #1814 adduser does not work in Class: LiveUser_Admin_Perm_Container_DB_Simple
Submitted: 2004-07-07 18:44 UTC
From: jack at studiorvb dot com Assigned: lsmith
Status: Closed Package: LiveUser
PHP Version: 4.3.7 OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 49 - 4 = ?

 
 [2004-07-07 18:44 UTC] jack at studiorvb dot com
Description: ------------ (i'm discovering liveuser, so now knowing that that was not the best way) Trying to add an user to my right application based on 'admin_example.php' within the example 5, so : - first adding an user to the 'LiveUser_Admin_Auth_Container_DB' - then adding to 'LiveUser_Admin_Perm_Container_DB_Medium' (or complex) the first one succeed, but I never succeeded the second adduser function. I began with exactly the example code, and then adapted it to my needs and tried to modify some param to add it. Bug ? As I succeeded with the adduser function of the LiveUser_Admin, I did no code search, sorry ;-) Reproduce code: --------------- $objRightsAdminAuth = new LiveUser_Admin_Auth_Container_DB( $lu_dsn, $conf['authContainers'][0] ); $objRightsAdminPerm = new LiveUser_Admin_Perm_Container_DB_Medium($lu_dsn, $conf); $objRightsAdminPerm->setCurrentLanguage('FR'); $user_auth_id = $objRightsAdminAuth->addUser('johndoe', 'dummypass', true); if (DB::isError($user_auth_id)) { $user_auth_id->getMessage(); //exit; } $user_perm_id = $objRightsAdminPerm->addUser($user_auth_id); echo '$user_id created ' . $user_auth_id . "\n"; Expected result: ---------------- the same user created in auth and perm. Actual result: -------------- code above : success for Auth user, and error for perm user.

Comments

 [2004-07-21 10:36 UTC] smith at backendmedia dot com
This is a bug in the example due to a recent API change. You are missing the second parameter from your addUser call. However the second parameter was defined as optional, but caused an error to be raised if it was not passed. I cleaned that up. In the future please include a print_r() of the error you got to make debugging easier for us. Thx. $user_perm_id = $objRightsAdminPerm->addUser($user_auth_id); if (LiveUser::isError($user_perm_id)) { print_r($user_perm_id); }