=== modified file 'autologout/autologout.module'
--- autologout/autologout.module	2012-10-23 09:02:14 +0000
+++ autologout/autologout.module	2012-10-26 10:19:11 +0000
@@ -261,7 +261,7 @@
  $default_timeout = variable_get('autologout_timeout', 1800);
  $roles = user_roles(TRUE);
 
-//Go through roles, get timeouts for each and return as array, 
+  //Go through roles, get timeouts for each and return as array, 
  foreach ($roles as $rid => $role) {
    $timeout_role = variable_get('autologout_role_' . $rid . '_timeout', $default_timeout);
    $role_timeout[$rid] = $timeout_role;
@@ -283,24 +283,23 @@
     }
 
   $default_timeout = variable_get('autologout_timeout', 1800);
-
-    if (!variable_get('autologout_user_' . $userid, $default_timeout)) { // If no individual timeout is set
-      if (variable_get('autologout_role_logout', FALSE)) { //Get role timeouts for user
-        $roles = $user -> roles;
-        $output = array();
-        $timeouts = _autologout_get_role_timeout();
-          foreach ($roles as $rid => $role) {
-            $output[$rid] =  $timeouts[$rid];
-          }
-        $user_timeout = min($output);  // Assign the lowest timeout value to be session timeout value
-      }
-      else{
-        $user_timeout = $default_timeout;
-      }
+  if (!variable_get('autologout_user_' . $userid, FALSE)) { // If no individual timeout is set
+    if (variable_get('autologout_role_logout', FALSE)) { // Get role timeouts for user
+      $roles = $user -> roles;
+      $output = array();
+      $timeouts = _autologout_get_role_timeout();
+        foreach ($roles as $rid => $role) {
+          $output[$rid] =  $timeouts[$rid];
+        }
+      $user_timeout = min($output);  // Assign the lowest timeout value to be session timeout value
     }
     else{
-      $user_timeout = variable_get('autologout_user_' . $userid, $default_timeout); 
+      $user_timeout = $default_timeout;
     }
+  }
+  else{
+    $user_timeout = variable_get('autologout_user_' . $userid, $default_timeout); 
+  }
   return $user_timeout;
 }

