Monday, November 10, 2008

Adding new User RunCMS

include_once(XOOPS_ROOT_PATH."/class/xoopsobject.php");
include_once(XOOPS_ROOT_PATH."/class/xoopsuser.php");
include_once(XOOPS_ROOT_PATH."/include/functions.php");


$name=$_REQUEST["name"];
$uname=$_REQUEST["uname"];
$passwd=$_REQUEST["passwd"];
$shapwd = rc_shatool($uname.$passwd);
$user= new XoopsUser();
$user->setVar("name", $name,true);
$user->setVar("uname", $uname,true);
$user->setVar("pass", $shapwd,true);
$user->setVar("level",1,true);
$user->store();

No comments:

Post a Comment