$this->roles=array();
$this->rights=array();
$this->flags=array();
- $sid=$trans->getHeader("Wob-SessionId");
+ $sid=$trans->getHeader("SessionId");
$res=$db->select("session","sessionid,uname","sessionid=".$db->escapeString($sid));
if(count($res)>0){
$this->sessid=$sid;
{
public function __construct()
{
+ }
+
+ protected function mkSession()
+ {
//make sure we have a session
global $session;
if(!isset($session))new Session($this);
protected function isAuthenticated()
{
+ $this->mkSession();
return Session::instance()->isAuthenticated();
}
protected function isAuthorized($tn)
{
+ $this->mkSession();
return Session::instance()->isAuthenticated() && Session::instance()->canExecute($tn);
}
protected function userName()
{
+ $this->mkSession();
return Session::currentUserName();
}
};