Re: LiveUser create object problems
| From: | Lukas Smith | Date: | Thu, 18 Nov 2004 07:54:46 +0000 |
| Subject: | Re: LiveUser create object problems | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-15621@lists.php.net to get a copy of this message | ||
Zaid Emeish wrote:
Hi;
I've been trying to use PEAR::LiveUser but the problem is that i can't create the right object to access function userExists i tried this code
$lu_dsn = array('dsn' => $dsn);
$LU = new LiveUser_Auth_Container_DB(&$lu_dsn);
//check if user exists in database
if( $LU->userExists($username) ){
die('Username'. $username .'already exists. Please Enter another username');
}.
it doesn't give me any error but as if the function doesn't exisit.
I don't know am I creating the object wrongly knowing that i included the right classes. And what is the right way to create an object For this class.
Have a look at some of the examples in that get installed to the docs folder. You actually just want to create an instance of the LiveUser object like so:
$LU = LiveUser::factory($conf);
regards,
Lukas