From: Richard S. <ri...@ri...> - 2003-05-30 07:31:50
|
I'm trying to use $_SESSION['OBJ_user']->userAction("add") to add the posted values into the database through my own user creation form however I keep getting the error below. /************************************************/ DB Error: no database selected select * from mod_users where email = 'ea...@ds...' [nativecode= ** ] /************************************************/ Anyone have any idea why or should I be using another function to create user's manually? Thanks, Richard S. |
From: Richard S. <ri...@ri...> - 2003-05-30 08:08:30
|
Here's the function I wrote that's not working... function createNewUser($userInfo){ =09 if(is_array($_POST)) $_POST=3Darray_merge($_POST, $userInfo); else $_POST=3D$userInfo; =09 $_SESSION["newUser"] =3D new PHPWS_User; $_SESSION["newUser"]->userAction("add"); =09 } =09 =00=00 On Friday, May 30, 2003, at 12:31 AM, Richard Sumilang wrote: > I'm trying to use $_SESSION['OBJ_user']->userAction("add") to add the=20= > posted values into the database through my own user creation form=20 > however I keep getting the error below. > > /************************************************/ > > DB Error: no database selected > select * from mod_users where email =3D 'ea...@ds...' [nativecode=3D = ** ] > > /************************************************/ > > Anyone have any idea why or should I be using another function to=20 > create user's manually? > > Thanks, > > Richard S. > > > > ------------------------------------------------------- > This SF.net email is sponsored by: eBay > Get office equipment for less on eBay! > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > |
From: Matthew M. <ma...@tu...> - 2003-05-30 16:02:00
|
Use this instead: $user = new PHPWS_User; $user->setUsername($username); $user->setPassword($password); // do not hash it $user->setEmail($email); $user->setAdmin(TRUE); // or FALSE $user->setDeity(TRUE); // or FALSE $user->save(); Matthew McNaney Internet Systems Architect Electronic Student Services Appalachian State University Phone: 828-262-6493 phpwebsite.appstate.edu ess.appstate.edu |
From: Richard S. <ri...@ri...> - 2003-05-30 18:16:11
|
Great! Is there a function for returning the users' id that was just created as well? On Friday, May 30, 2003, at 08:55 AM, Matthew McNaney wrote: > Use this instead: > > $user = new PHPWS_User; > $user->setUsername($username); > $user->setPassword($password); // do not hash it > $user->setEmail($email); > $user->setAdmin(TRUE); // or FALSE > $user->setDeity(TRUE); // or FALSE > $user->save(); > > > Matthew McNaney > Internet Systems Architect > Electronic Student Services > Appalachian State University > Phone: 828-262-6493 > phpwebsite.appstate.edu > ess.appstate.edu > > > ------------------------------------------------------- > This SF.net email is sponsored by: eBay > Get office equipment for less on eBay! > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > |
From: Eloi G. <el...@re...> - 2003-05-31 19:02:42
|
> Great! Is there a function for returning the users' id that was just > created as well? What do you mean, something other than $newId = $user->getUserId($username)? |
From: Richard S. <ri...@ri...> - 2003-06-02 00:13:26
|
No, I was looking for $user->getUserId(); which Matt answered. Thanks :-) On Saturday, May 31, 2003, at 11:34 AM, Eloi George wrote: >> Great! Is there a function for returning the users' id that was just >> created as well? > > What do you mean, something other than $newId = > $user->getUserId($username)? > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: eBay > Get office equipment for less on eBay! > http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > |