2
i have managed to obtain partial success in my requirements....
Valide is updated correctly.... from 0 to 1...
Date is updated on DB, but wrong date is inserted
IP is updated on DB but only the first part of adress (xx.XX.XX.XX only xx is inserted)
I have placed variable controls in activate function, which provide me the right data, but this data is not inserted in Database correctly
script is now the following :
function activateUser(&$user)
{
if ($user->getVar('level') != 0) {
return true;
}
$user->setVar('level', 1);
$user->setVar('valide', 1);
$ip_text = getenv(REMOTE_ADDR);
$dateus = date("Y-m-d");
$heure = date("H:i:s");
$lejour = "$dateus "."$heure";
echo "Variable date :".$lejour;
echo "Variable ip :".$ip_text;
$user->setVar('date', $lejour);
$user->setVar('ip', $ip_text);
return $this->_uHandler->insert($user, true);
}
I am wondering if the problem doesn't come from he kernel/user.php definitions :
I use for ip and date :
$this->initVar('date', XOBJ_DTYPE_OTHER, 0, false);
$this->initVar('ip', XOBJ_DTYPE_TXTBOX, 0, false, 64);
and i wonder if these are the right ones...
By the way i have not found any documentation on these XOBJ_DTYPE_XXX things... In particular, what are the different types accepted, and what are their variables...
If any of you can bring me help, it would be grandly appreciated... And if devs could answer my XOBJ question, i'd appreciate...
Tdldp