Re: Liveuser- updating perm_user table
| From: | Jeroen Houben | Date: | Wed, 31 Aug 2005 13:23:09 +0000 |
| Subject: | Re: Liveuser- updating perm_user table | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20692@lists.php.net to get a copy of this message | ||
Lukas Smith wrote:
Jeroen Houben wrote:Got the CVS version and it's stopped throwing notices now. Maybe another addition could be to enforce $filters to be present. Even though the method signature shows this parameter is mandatory, you can still ignore it or pass in NULL. This wil result in updating all your users IIRC. Unless you want to keep this option, I suggest doing a proper check on $filters and raising an execption / warning if it is set to null or array(). JeorenI'm wondering what the parameters of LiveUser_Admin_Perm_Simple::updateUser() should look like. I want to "upgrade" a user to become a masteradmin. $user_to_add = array();There is a bug in the current releases version in the sanity checking. Its fixed in CVS and I will soon make a new release.$user_to_add['perm_type'] = LIVEUSER_MASTERADMIN_TYPE_ID;$filter = array('auth_user_id' => 'jeroen@terena.nl'); $res = $lu_admin->perm->updateUser($user_to_add, $filter); This seems to work, but it does throw notices - is this the right way of doing things? I tried looking in the examples but could only find an example that updates the "users" table, not the "perm_users" table