function _agenda_parse_googleid in Agenda 6.2
Same name and namespace in other branches
- 7.2 agenda.module \_agenda_parse_googleid()
- 7 agenda.module \_agenda_parse_googleid()
Parse a Google ID into the email address and token components
e.g. p54126mdgs4r1jeqrjcrp4big4@group.calendar.google.com/private-181818aa271006f5de8919ac93fc04f7
3 calls to _agenda_parse_googleid()
- agenda_admin_configure_validate in ./
agenda.admin.php - Validate function for the admin configuration
- agenda_debug in ./
agenda.admin.php - Provide a page to debug a calendar ID that is not working
- agenda_get_events in ./
agenda.module - Given a list of calendar IDs, parse out and return any event data
File
- ./
agenda.module, line 510
Code
function _agenda_parse_googleid($googleid) {
$parts = explode('/', $googleid);
if (!valid_email_address($parts[0])) {
return FALSE;
}
$token = 'public';
if (count($parts) === 2) {
$token = $parts[1];
}
return array(
$parts[0],
$token,
);
}