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

Bug #367 Parameter mismatch in LiveUser_Admin_Perm_DB_Common::removeUserAreaAdmin()
Submitted: 2003-12-06 00:48 UTC
From: kipaten21 at hotmail dot com Assigned: arnaud
Status: Closed Package: LiveUser
PHP Version: Irrelevant OS: ANY
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 : 23 + 25 = ?

 
 [2003-12-06 00:48 UTC] kipaten21 at hotmail dot com
Description: ------------ The method LiveUser_Admin_Perm_DB_Common::removeUserAreaAdmin() takes two arguments, $authId and $area_id. However, it is called from LiveUser_Admin_Perm_DB_Common::removeUser() with only the authId... // remove user area admin relation $result = $this->removeUserAreaAdmin($authId); LiveUser_Admin_Perm_DB_Common::removeUserAreaAdmin() should be changed to accept an area_id optionally, that way the removeUser() method doesn't have to call removeUserAreaAdmin() for each Area that User may be an admin of. Suggest changing prototype to.... function removeUserAreaAdmin($authId, $area_id = null) and changing $query to.... $query = ' DELETE FROM ' . $this->prefix . 'area_admin_areas WHERE perm_user_id=' . $permId .' '; if (is_numeric($area_id)) $query .= 'AND area_id=' . (int)$area_id;

Comments

 [2003-12-06 00:53 UTC] kipaten21 at hotmail dot com
Also remove check for area_id at top of method... change if (!is_numeric($authId) && !is_numeric($area_id)) to if (!is_numeric($authId))
 [2003-12-07 15:34 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!