36 $this->
user = $a_user_id;
37 $this->token = $a_token;
46 $query =
"SELECT * FROM cal_auth_token " .
47 "WHERE user_id = " . $ilDB->quote($a_user_id,
'integer') .
' ' .
48 "AND selection = " . $ilDB->quote($a_selection,
'integer') .
' ' .
49 "AND calendar = " . $ilDB->quote($a_calendar,
'integer');
66 $query =
"SELECT * FROM cal_auth_token " .
67 "WHERE hash = " . $ilDB->quote($a_token,
'text');
101 $this->selection_type =
$a_type;
111 $this->calendar = $a_cal;
172 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
193 $query =
"INSERT INTO cal_auth_token (user_id,hash,selection,calendar) " .
195 $ilDB->quote($this->
getUserId(),
'integer') .
', ' .
196 $ilDB->quote($this->
getToken(),
'text') .
', ' .
198 $ilDB->quote($this->
getCalendar(),
'integer') .
' ' .
200 $ilDB->manipulate(
$query);
211 $random = new \ilRandom();
224 $query =
"SELECT * FROM cal_auth_token " .
225 "WHERE user_id = " . $ilDB->quote($this->
getUserId(),
'integer');
227 $query =
'SELECT * FROM cal_auth_token ' .
228 'WHERE user_id = ' . $ilDB->quote($this->
getUserId(),
'integer') .
' ' .
229 'AND hash = ' . $ilDB->quote($this->
getToken(),
'text');
234 $this->token =
$row->hash;
235 $this->selection_type =
$row->selection;
236 $this->calendar =
$row->calendar;
237 $this->ical =
$row->ical;
238 $this->ical_ctime =
$row->c_time;
createToken()
Create a new token.
setCalendar($a_cal)
set calendar id
static _getInstance()
get singleton instance
isIcalExpired()
Check if cache is disabled or expired.
foreach($_POST as $key=> $value) $res
getSelectionType()
get selection type for key
Create styles array
The data for the language used.
static lookupUser($a_token)
Lookup user by hash.
getUserId()
Get current user.
static lookupAuthToken($a_user_id, $a_selection, $a_calendar=0)
Handles calendar authentication tokens for external calendar subscriptions.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
setSelectionType($a_type)
set selection type
__construct($a_user_id, $a_token='')
Constructor.