35 $this->user = $a_user_id;
36 $this->token = $a_token;
45 $query =
"SELECT * FROM cal_auth_token ".
46 "WHERE user_id = ".$ilDB->quote($a_user_id,
'integer').
' '.
47 "AND selection = ".$ilDB->quote($a_selection,
'integer').
' '.
48 "AND calendar = ".$ilDB->quote($a_calendar,
'integer');
66 $query =
"SELECT * FROM cal_auth_token ".
67 "WHERE hash = ".$ilDB->quote($a_token,
'text');
102 $this->selection_type = $a_type;
112 $this->calendar = $a_cal;
155 'ical' => array(
'clob',$this->
getIcal()),
156 'c_time' => array(
'integer',time())
159 'user_id' => array(
'integer',$this->
getUserId()),
160 'hash' => array(
'text',$this->
getToken())
171 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
194 $query =
"INSERT INTO cal_auth_token (user_id,hash,selection,calendar) ".
196 $ilDB->quote($this->
getUserId(),
'integer').
', '.
197 $ilDB->quote($this->
getToken(),
'text').
', '.
201 $ilDB->manipulate(
$query);
223 $query =
"SELECT * FROM cal_auth_token ".
224 "WHERE user_id = ".$ilDB->quote($this->
getUserId(),
'integer');
229 $this->token =
$row->hash;
230 $this->selection_type =
$row->selection;
231 $this->calendar =
$row->calendar;
232 $this->ical =
$row->ical;
233 $this->ical_ctime =
$row->c_time;