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');
67 $query =
"SELECT * FROM cal_auth_token ".
68 "WHERE hash = ".$ilDB->quote($a_token,
'text');
103 $this->selection_type =
$a_type;
113 $this->calendar = $a_cal;
174 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
197 $query =
"INSERT INTO cal_auth_token (user_id,hash,selection,calendar) ".
199 $ilDB->quote($this->
getUserId(),
'integer').
', '.
200 $ilDB->quote($this->
getToken(),
'text').
', '.
204 $ilDB->manipulate(
$query);
228 $query =
"SELECT * FROM cal_auth_token ".
229 "WHERE user_id = ".$ilDB->quote($this->
getUserId(),
'integer');
233 $query =
'SELECT * FROM cal_auth_token '.
234 'WHERE user_id = '.$ilDB->quote($this->
getUserId(),
'integer').
' '.
235 'AND hash = '.$ilDB->quote($this->
getToken(),
'text');
242 $this->token =
$row->hash;
243 $this->selection_type =
$row->selection;
244 $this->calendar =
$row->calendar;
245 $this->ical =
$row->ical;
246 $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.
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.