I have a request for 1 user only ($user->name) that after they leave a particular node/page ($node->title) that they be automatically be logged off of drupal. Leaving this page includes navigating to another page or closing the tab or browser window. How could the automatic logoff when leaving a page for a particular user and node/page combination be accomplished?
1 Answer
AFAIC you can get current node id from Drupal JS object. Having those id you can send Ajax request to Drupal which performs logout (http://api.drupal.org/api/drupal/modules!user!user.pages.inc/function/user_logout/7)
About JS events for this task you should look on other forurms
-
any way here is more detailed info: stackoverflow.com/questions/4357773/…– CodiumMar 28, 2013 at 21:02