Re: Pear LiveUser
| From: | Lukas Smith | Date: | Mon, 22 Nov 2004 23:57:39 +0000 |
| Subject: | Re: Pear LiveUser | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-15761@lists.php.net to get a copy of this message | ||
Zaid Emeish wrote:
dunno if i mentioned to you this before:
we are currently reworking client API LiveUser internally (with some minor BC breaks) and totally redoing the LiveUser Admin API.
So depending on where you want to be in what timeframe you may want to look at the code in CVS in the LiveUser and LiveUser_Admin CVS dir. At this stage however the code is not as "stable" as the latest beta release.
i have two questions regarding PEAR LiveUser: 1- I want to check if the user already exists & here is the code i'm using: $authFilter = array(what doesnt work? are you getting an error?'handle' => array('name' => 'handle', 'op' => '=', 'value' => "$username", 'cond' => ''),); //check if user exists in database if( $admin->auth->getUsers($authFilter) ){die('Username' .$username. 'already exists. Please Enter another username');}else{ //add user to liveuser_users $user_id = $admin->addUser($username , $password, null, false, null, null, null); } but it is not working.
2- After adding a user to the database the is_active col is N by default so to activate the user do i set a parameter in the function addUser or i should do my own function.in the above call you can add an array of optional parameters as the third parameter: array('is_active' => true) regards, Lukas