function google_analytics_counter_revoke in Google Analytics Counter 7.3
Same name and namespace in other branches
- 7.2 google_analytics_counter_auth.inc \google_analytics_counter_revoke()
Programatically revoke token.
2 calls to google_analytics_counter_revoke()
- google_analytics_counter_auth_admin_submit in ./
google_analytics_counter_auth.inc - Submit handler.
- google_analytics_counter_reset in ./
google_analytics_counter.module - Reset all module settings by deleting its variables.
File
- ./
google_analytics_counter_auth.inc, line 285 - Provides the GAFeed object type and associated methods.
Code
function google_analytics_counter_revoke() {
$gafeed = google_analytics_counter_new_gafeed();
$gafeed
->revokeToken();
// Delete module variables.
$query = db_select('variable', 'v')
->fields('v', array(
'name',
))
->condition('name', db_like('google_analytics_counter') . '%', 'LIKE')
->execute();
while ($variable = $query
->fetchAssoc()) {
variable_del($variable['name']);
}
}