Pear LiveUser
| From: | Zaid Emeish | Date: | Tue, 23 Nov 2004 04:07:28 +0000 |
| Subject: | Pear LiveUser | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-15758@lists.php.net to get a copy of this message | ||
hi;
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(
'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.
regards Zaid