1
Hi I want to add to function activateUser() a notification from one of the modules to be default checked for the registered users.
so I have added this to the activateUser() function, but i can't make this to insert value into xoopsnotifications table,
Please help me thanks.
function activateUser(&$user)
{
if ($user->getVar('level') != 0) {
return true;
}
$user->setVar('level', 1);
//notification mod start
//module id =9
$query = "INSERT INTO ".$xoopsDB->prefix("xoopsnotifications")." (not_modid, not_itemid, not_category, not_event, not_uid, not_mode) VALUES (9,".$user->getVar('uid').",'scrap','new_scrap',".$user->getVar('uid').",0)";
$res=$xoopsDB->query($query);
if(!$res) {
echo "error: $query";
}
//notification mod end
return $this->_uHandler->insert($user, true);
}