Re: Re: LiveUser create object problems
| From: | Lukas Smith | Date: | Thu, 18 Nov 2004 21:59:54 +0000 |
| Subject: | Re: Re: LiveUser create object problems | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-15659@lists.php.net to get a copy of this message | ||
Zaid Emeish wrote:
Lukas Smith wrote:well the client api is not meant to be used this way. we have an admin api to read things from the database. the client api is meant just for authenticating and checking permissions for a single user. check out the docs listed on our wiki: pear.limbourg.com regards, LukasZaid Emeish wrote: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 :).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) ){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, Lukasdie('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.