1
Defkon1
Insert new user fails in 2.5.4
  • 2012/2/24 16:21

  • Defkon1

  • Not too shy to talk

  • Posts: 151

  • Since: 2005/1/27


I've used (for years) the following code to add programmatically a new user to xoops:

$newuser $member_handler->createUser();

     
$newuser->setVar('user_viewemail',0true);
     
$newuser->setVar('name',$nametrue);
     
$newuser->setVar('uname'$mailtrue);
     
$newuser->setVar('email'$mailtrue);
     
$newuser->setVar('pass',md5($newpass), true);
     
$newuser->setVar('timezone_offset'$xoopsConfig['default_TZ'], true);
     
$newuser->setVar('user_regdate'time(), true);
     
$newuser->setVar('uorder',$xoopsConfig['com_order'], true);
     
$newuser->setVar('umode',$xoopsConfig['com_mode'], true);
     
$newuser->setVar('user_mailok',1true);
     
$newuser->setVar('uorder',$xoopsConfig['com_order'], true);
     
$newuser->setVar('umode',$xoopsConfig['com_mode'], true);
     
$newuser->setVar('level'1true);
     
$newuser->setVar('user_avatar','blank.gif'true);
         
     
//$member_handler->insertUser($newuser);
        
if (! $member_handler->insertUser($newuser)) {            
            echo 
$newuser->getHtmlErrors();
        } else {

...

}


It worked for year, but now (2.5.4) it fails:

Warning:Insert failed in method 'cleanVars' of object 'XoopsUser' in file /class/model/write.php at line 270


any hint?

2
Defkon1
Re: Insert new user fails in 2.5.4
  • 2012/2/24 16:36

  • Defkon1

  • Not too shy to talk

  • Posts: 151

  • Since: 2005/1/27


f*#k... found...

uname too long... shame on me.

Login

Who's Online

158 user(s) are online (96 user(s) are browsing Support Forums)


Members: 0


Guests: 158


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits