- added function to set user id in session (currently not used)

This commit is contained in:
steinm 2013-02-06 17:33:11 +00:00
parent 9ccca2261d
commit 8e950290dc

View File

@ -147,6 +147,22 @@ class LetoDMS_Session {
return $this->id;
} /* }}} */
/**
* Set user of session
*
* @param integer $userid id of user
*/
function setUser($userid) { /* {{{ */
/* id is only set if load() was called before */
if($this->id) {
$queryStr = "UPDATE tblSessions SET userID = " . $this->db->qstr($userid) . " WHERE id = " . $this->db->qstr($this->id);
if (!$this->db->getResult($queryStr))
return false;
$this->data['userid'] = $userid;
}
return true;
} /* }}} */
/**
* Set language of session
*