Commit 4d494c34ef1c755b40e0f70027f06f3ba7fde698

Authored by Utkarsh Singh
1 parent ce80c984

Committing updated code regarding unblock user implementation

150-DOCUMENTATION/002-DBScripts/GetBlockedUserByUserType.sql deleted
1   --- ================================================
2   --- Template generated from Template Explorer using:
3   --- Create Procedure (New Menu).SQL
4   ---
5   --- Use the Specify Values for Template Parameters
6   --- command (Ctrl-Shift-M) to fill in the parameter
7   --- values below.
8   ---
9   --- This block of comments will not be included in
10   --- the definition of the procedure.
11   --- ================================================
12   -SET ANSI_NULLS ON
13   -GO
14   -SET QUOTED_IDENTIFIER ON
15   -GO
16   --- =============================================
17   --- Author: <EBIX SOFTWARE INDIA PVT. LTD.>
18   --- Create date: <2/8/2017>
19   --- Description: <Description,,>
20   --- =============================================
21   -CREATE PROCEDURE GetBlockedUserByUserType
22   - -- Add the parameters for the stored procedure here
23   - @iUserTypeId tinyint
24   -AS
25   -BEGIN
26   - -- returns the metadata
27   - IF 1=0 BEGIN
28   - SET FMTONLY OFF
29   - END
30   - SELECT DISTINCT
31   - AIAUser.Id,
32   - AIAUser.FirstName,
33   - AIAUser.LastName,
34   - AIAUser.LoginId,
35   - AIAUser.Password,
36   - AIAUser.EmailId,
37   - ISNULL(License.AccountNumber,'') AccountNumber,
38   - IncorrectLoginAttempts.LoginTime
39   - FROM
40   - IncorrectLoginAttempts
41   - INNER JOIN AIAUser ON IncorrectLoginAttempts.UserId = AIAUser.Id
42   - INNER JOIN UserType ON AIAUser.UserTypeId = UserType.Id
43   - LEFT JOIN AIAUserToLicenseEdition ON AIAUser.Id = AIAUserToLicenseEdition.UserId
44   - LEFT JOIN LicenseToEdition ON AIAUserToLicenseEdition.LicenseEditionId = LicenseToEdition.Id
45   - LEFT JOIN License ON LicenseToEdition.LicenseId = License.Id
46   - WHERE
47   - IncorrectLoginAttempts.CntIncorrectLogins >= 5
48   - AND UserType.Priority >= (SELECT UserType.Priority FROM UserType WHERE UserType.Id=@iUserTypeId)
49   - --AND ((@iLicenseId =0) OR (License.Id = @iLicenseId))
50   - --AND License.IsActive = 1
51   -END
52 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs
... ... @@ -212,6 +212,7 @@ namespace AIAHTML5.API.Models
212 212 else
213 213 {
214 214 objUser.IsBlocked = true;
  215 + objUser.IncorrectLoginAttemptCount = 5;
215 216 }
216 217 }
217 218 else
... ...