fixed bug in user login: user without grace logins left was able to login successfully
authorVictor Kirhenshtein <victor@netxms.org>
Sat, 14 May 2016 15:39:00 +0000 (18:39 +0300)
committerVictor Kirhenshtein <victor@netxms.org>
Sat, 14 May 2016 15:39:00 +0000 (18:39 +0300)
src/server/core/userdb.cpp

index 9ceba0e..0583778 100644 (file)
@@ -433,9 +433,13 @@ result:
             {
                *pbChangePasswd = false;
             }
-            *pdwSystemRights = GetEffectiveSystemRights(user);
-            user->updateLastLogin();
-            dwResult = RCC_SUCCESS;
+
+            if (dwResult != RCC_NO_GRACE_LOGINS)
+            {
+               *pdwSystemRights = GetEffectiveSystemRights(user);
+               user->updateLastLogin();
+               dwResult = RCC_SUCCESS;
+            }
          }
          else
          {