# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: contributions/modules/login_security/login_security.module
--- contributions/modules/login_security/login_security.module Base (1.12.2.4)
+++ contributions/modules/login_security/login_security.module Locally Modified (Based On 1.12.2.4)
@@ -316,11 +316,9 @@
       unset($_SESSION['messages']['error']);
     }
 
-
     // Should the user be advised about the remaining login attempts?
     $notice_user = variable_get('login_security_notice_attempts_available', LOGIN_SECURITY_NOTICE_ATTEMPTS_AVAILABLE);
-    if ($notice_user == TRUE) {
-      if (!$account) {
+    if (($notice_user == TRUE) && ($variables['%user_block_attempts'] > 0)) {
         // this loop is instead of doing t() because t() can only translate static strings, not variables.
         foreach ($variables as $key => $value) {
           $variables[$key] = theme('placeholder', $value);
@@ -329,7 +327,6 @@
       }
     }
   }
-}
 
 /**
  * Save the login attempt in the tracking database: user name and ip address.
