\BHB::$userData->oSet()
\BHB::$userData->oGet()
\BHB::$userData->oUnset()
To store some not sensible datas of user in a $_SESSION
we use \BHB::$userData.
In /config/config_userdata.php you may config your tree better for your project.
A classic config for \BHB::$userData is:
<?php //set the $_SESSION[userdata] array. BHBsoft get here the model. return array( "date" => date("Y-m-d"), //of creation. "time" => date("H:i:s"), //of creation. "layout" => "cms", //but may be on other too. "lang" => "eng", "geoo" => array( // geo own "dbal" => "", //dbalias "cont" => "", "stat" => "", "regi" => "", "city" => "", ), "geov" => array( // geo visitor "dbal" => "IT", //dbalias "cont" => "", "stat" => "", "regi" => "", "city" => "", ), "login" => array( "dbal" => "", //the dbAlias for the cookie table. "time" => date("Ymd"), //the table of cookie registred but if are nor than one tables. "idtc" => "", //id of cookies_us (_ubus or _adm) "key" => "", //login key //"coco" => "", //country_code, usualy is the same with the state sigla. "is" => "0", //0,1 0 means guest, 1 one of type: "type" => "", //user, ubusness, admin, usaddmin, sadmin //"nick" => "", //"name" => "", //"surn" => "", "sid" => "", //sid2 = jump + sid; //"isko" => "1", //is KO! by jump+sid2 controll? 0 == no, 1 == yes "ip" => $_SERVER['SERVER_ADDR'], "uage" => $_SERVER['HTTP_USER_AGENT'], //useragent "errorMsg" => "", /* "type" => array( "user" => "", "ubus" => "", "adm" => "", "usad" => "", "sadm" => "", ), */ ), ); ?>
To set get or unset:
Caution: you may create a tree with 4 commas maximum.
<?php \BHB::$userData->oSet("ud,lang", "eng"); \BHB::$userData->oGet("ud,lang") //prints eng \BHB::$userData->oUnset("ud,lang") ?>
end.