Re: Re: LiveUser create object problems

From: Date: Fri, 19 Nov 2004 06:55:39 +0000
Subject: Re: Re: LiveUser create object problems
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15655@lists.php.net to get a copy of this message
Lukas Smith wrote:
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 Dear Lukas i really appretiate ur concern; but i have tried this solution but it didn't work because i am trying to access a function in the Auth Container not in admin nor in LiveUser classes & the problem is in this access.
i have tried to do the following: 1- $usr = LiveUser::singleton($conf); 2-$LU = &LiveUser::factory($conf); 3-2-$LU = LiveUser::factory($conf); but it always gave me this error *Fatal error*: Call to undefined function: userexists() in *d:\projects\peartest\add_user.php* on line *17. *what am i doing wrong. any help is really appretiated :). regards Zaid.

« previous php.pear.general (#15655) next »