Re: liveuser_admin getUsers
| From: | Lukas Smith | Date: | Fri, 14 Oct 2005 11:50:34 +0000 |
| Subject: | Re: liveuser_admin getUsers | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-21463@lists.php.net to get a copy of this message | ||
Jeroen Houben wrote:
Hi,
I have an list of email addresses. For each address I would like to check if a corresponding user exists in Liveuser.
Here's my code:
$lu_admin = LiveUser_Admin::factory($LUOptions);
$lu_admin->setAdminPermContainer();
$lu_admin->setAdminAuthContainer('database');
foreach ($emails as $email) {
$filters = array();
$filters['auth_user_id'] = $email;
$user = $lu_admin->getUsers('perm', $filters, true);
if (!$user) {
// do some stuff
}
}
//note that "auth_user_id" is always unique email address.
This seems to work until we come accross an email that has a corresponding liveuser entry with an auth_container_name set the radius, which is my other auth container (see config below).
I get an error.
Hmm not much we can reasonably do here. Only solutions I can think of are kinda hacky. So all you can do is create a dummy container for the radius stuff.
regards,
Lukas