Index: autologout.module
===================================================================
--- autologout.module	(revision 24060)
+++ autologout.module	(working copy)
@@ -364,6 +364,17 @@
     $account = $user;
   }
 
+  /**
+   * fixed the bug 
+   * when the anonymous or authenticated role name were translated, so the comparsion will be fail
+   */
+  foreach ($account->roles as $rid => $rname) {
+    if (  $rid == DRUPAL_ANONYMOUS_RID 
+        ||$rid == DRUPAL_AUTHENTICATED_RID ) {
+      $account->roles[$rid] = t($rname);
+    }
+  }
+  
   foreach (user_roles(TRUE) as $role) {
     switch (_autologout_local_settings($role)) {
       case 0: // Enforce for all in this role
@@ -394,6 +405,17 @@
     $account = $user;
   }
 
+ /**
+  * fixed the bug 
+  * when the anonymous or authenticated role name were translated, so the comparsion will be fail
+  */
+  foreach ($account->roles as $rid => $rname) {
+    if (   $rid == DRUPAL_ANONYMOUS_RID 
+        || $rid == DRUPAL_AUTHENTICATED_RID ) {
+      $account->roles[$rid] = t($rname);
+    }
+  }
+  
   foreach (user_roles(TRUE) as $role) {
     if (_autologout_local_settings($role) == 2 && in_array($role, array_values($account->roles))) {
       return TRUE;
