PEAR is archived and read-only

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

Home » Authentication » LiveUser » Bug #2208

add- & updateuser (Admin & Cont Auth) does not set owner_user_id nor group_id !

Details

Submitted2004-08-24 19:28 UTC
Fromliveuser at jackanova dot net
StatusNo Feedback
PackageLiveUser
PHP Version4.3.8
Roadmaps(Not assigned)

Comments

[2004-08-24 19:28 UTC] liveuser at jackanova dot net

Description:
------------
I tried to create a user, so getting its id and updating it with putting its id in owner_user_id and the group I wanted this user to be a member of in owner_group_id.

Those values were never updated in db (no errors).

either with Admin / Auth db.

even, setting the owner_group_id in the adduser function does not work...

Bug already submitted end 2003, but not fixed ???? please tell me if i a m wrong, thanks.

Reproduce code:
---------------
$lu_dsn = array('dsn' => $scms_dsn);

$objRightsAdminAuth = new LiveUser_Admin_Auth_Container_DB($lu_dsn, $scms_LUOptions['authContainers'][0]);

$objRightsAdminPerm = new LiveUser_Admin_Perm_Container_DB_Complex($lu_dsn, $scms_LUOptions);

$objRightsAdmin = new LiveUser_Admin($scms_LUOptions, 'EN');

// Assign Current Language
$objRightsAdminPerm->setCurrentLanguage('EN');
$objRightsAdminPerm->setCurrentApplication(1);

$new_user_id = $objRightsAdmin->addUser($scms_handle, $scms_password, NULL, true, null, null, null);

$lvusr_result = $objRightsAdmin->updateUser( $scms_user_id, NULL, $scms_password, null, $user_id, $group_id);

[2004-08-28 15:51 UTC] smith at backendmedia dot com

puh I assume your are using 0.12.x?

are you also using the complex container? because if you dont the owner group id will not be set.

furthermore we have totaly reworked handling of these properties in CVS and its unlikely that we will make a bug fix release for the old API.

anyways let us know some more details of your setup so we can better figure out how to help

[2004-08-28 16:13 UTC] liveuser at jackanova dot net

Yes, liveuser 0.12.0 (installed by pear)

sorry, but i do not know about cvs. do we have access to more up to date version there ?

thanks.

[2004-08-28 16:16 UTC] smith at backendmedia dot com

CVS is the version management software which we use to develop new versions. The next version is not ready yet though.

Again please verify if you are using the complex container, because only then will the owner id's be stored.

[2004-08-28 17:06 UTC] liveuser at jackanova dot net

And yes, I'm using complex container !

thkz

[2004-08-28 17:20 UTC] smith at backendmedia dot com

I think you are missing a few parameters:

function updateGroup($group_id, $group_name, $group_description = null, $active = null, $define_name = null, $group_type = null, $owner_user = null, $owner_group = null, $customFields = array())

[2004-08-28 19:54 UTC] liveuser at jackanova dot net

sorry, but it was updateuser...

[2004-08-29 12:38 UTC] smith at backendmedia dot com

One more thing that would be good to know is what backend you are using: DB, MDB or MDB2?

Its kinda hard to debug this issue or me. It would be great of you could dive into the source yourself and have a look at the Auth container for your chosen backend and add some debug code to see what is going wrong. I looked at the code and didnt see an issue, but I dont have any code readily available to test using the 0.12.0 version of LU.

Finally I am not sure of you understood the owner ID's purpose. The mean is not to assign a user to a group but to store who is the owner of a given user. This is used to determine the access rights if you use the checkRightLevel() method (although you have to fetch the owner ID's yourself and then pass them as the 2nd and 3rd parameter to checkRightLevel() ).

[2004-08-29 15:01 UTC] liveuser at jackanova dot net

- i'm using DB
- I will (if pursuing in that way) dive int o the code...
- I think i understood exactly how to use owner_*_id... it is because I wanted only the user to edit its data that I assign himself as the owner when it is created. As in my application, creating a user is related to its assignation to a group, I could assign him a owner_group_id as well.

thanks again for the time spent on my questions. Liveuser makes me win a huge development time (as pear does !).

[2004-08-29 15:05 UTC] smith at backendmedia dot com

your usage of owner_*_id's is correct. ok please let us know if you find the issue.

[2004-10-11 11:35 UTC] smith at backendmedia dot com

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

I am closing this bug as no feedback as we need to move on from the 0.12.x beta release cycle to the current 0.13.x and future 0.14.x release cycle.