|
|
@ -1,15 +1,12 @@ |
|
|
|
USE [FastMoneyPro_Remit] |
|
|
|
GO |
|
|
|
|
|
|
|
/****** Object: StoredProcedure [dbo].[mobile_proc_userLogin] Script Date: 12/11/2023 2:04:40 PM ******/ |
|
|
|
/****** Object: StoredProcedure [dbo].[mobile_proc_userLogin] Script Date: 12/18/2023 11:01:32 PM ******/ |
|
|
|
SET ANSI_NULLS ON |
|
|
|
GO |
|
|
|
|
|
|
|
SET QUOTED_IDENTIFIER ON |
|
|
|
GO |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ALTER PROCEDURE [dbo].[mobile_proc_userLogin] @flag VARCHAR(30) |
|
|
|
,@userName VARCHAR(100) = NULL |
|
|
|
,@Password VARCHAR(100) = NULL |
|
|
@ -159,22 +156,29 @@ BEGIN TRY |
|
|
|
|
|
|
|
SET @UserData = 'User: ' + @username + ' ,Password: ' + @Password + ' ,User Type:Mobile User' + ' ,Device Info: ' + @imei + ' ,IsBiometricLogin: ' + @isBiometricLogin + ' ,BiometricTypeLogin: ' + @biometricLoginType + ' ,DeviceType: ' + @deviceType + ' ,AccessCode: ' + ISNULL(@accessCode, '') + ' ,AccessToken: ' + ISNULL(@accessToken, '') |
|
|
|
|
|
|
|
DECLARE @isReferred BIT = 0 |
|
|
|
DECLARE @isReferred BIT = 0,@existingCustomer INT,@createdFrom VARCHAR(50) |
|
|
|
|
|
|
|
IF EXISTS ( |
|
|
|
SELECT TOP 1 'x' |
|
|
|
FROM referralmaster(NOLOCK) |
|
|
|
WHERE email = @userName |
|
|
|
OR mobile = @userName |
|
|
|
) |
|
|
|
SET @isReferred = 1 |
|
|
|
--IF EXISTS ( |
|
|
|
-- SELECT TOP 1 'x' |
|
|
|
-- FROM referralmaster(NOLOCK) |
|
|
|
-- WHERE email = @userName |
|
|
|
-- OR mobile = @userName |
|
|
|
-- ) |
|
|
|
-- SET @isReferred = 1 |
|
|
|
|
|
|
|
--SELECT * FROM customerMaster WHERE email = @userName |
|
|
|
SELECT @_lastLoggedInDevice = lastLoggedInDevice |
|
|
|
,@_accessCodeExpiry = accessCodeExpiry |
|
|
|
,@_accessCode = accessCode |
|
|
|
FROM dbo.mobile_userRegistration(NOLOCK) |
|
|
|
WHERE username = @userName |
|
|
|
|
|
|
|
|
|
|
|
SELECT |
|
|
|
@existingCustomer= ISNULL(isexistingcustomer,0), |
|
|
|
@customerPwd=customerPassword |
|
|
|
,@createdFrom=createdFrom |
|
|
|
FROM customerMaster WITH (NOLOCK) |
|
|
|
WHERE ISNULL(username,email)=@userName --and ISNULL(onlineUser, 'N')='Y' |
|
|
|
--IF @_lastLoggedInDevice = @Imei AND @_accessCodeExpiry > GETDATE() |
|
|
|
--BEGIN |
|
|
|
-- SET @accessCode=@_accessCode |
|
|
@ -222,6 +226,26 @@ BEGIN TRY |
|
|
|
|
|
|
|
DECLARE @redirectTo VARCHAR(100) = 'EYKC'; |
|
|
|
|
|
|
|
IF( @existingCustomer=1 and (@customerPwd IS NULL OR @customerPwd='')) |
|
|
|
|
|
|
|
BEGIN |
|
|
|
SELECT '1' ErrorCode |
|
|
|
,'Login Failed. Please click forgot Password to set new password.' Msg |
|
|
|
,NULL |
|
|
|
|
|
|
|
RETURN |
|
|
|
END |
|
|
|
|
|
|
|
IF( @createdFrom='C' and (@customerPwd IS NULL OR @customerPwd='')) |
|
|
|
|
|
|
|
BEGIN |
|
|
|
SELECT '1' ErrorCode |
|
|
|
,'Login Failed. Please click forgot Password to set new password.' Msg |
|
|
|
,NULL |
|
|
|
|
|
|
|
RETURN |
|
|
|
END |
|
|
|
|
|
|
|
IF EXISTS ( |
|
|
|
SELECT TOP 1 'X' |
|
|
|
FROM customerMasterTemp cm(NOLOCK) |
|
|
@ -425,7 +449,7 @@ BEGIN TRY |
|
|
|
IF @isMobileLoginEnabled = 'N' |
|
|
|
BEGIN |
|
|
|
SELECT '20' errorCode |
|
|
|
,'Your JME account is disabled. Contact JME support.' msg |
|
|
|
,'Your IME account is disabled. Contact JME support.' msg |
|
|
|
,@username id |
|
|
|
|
|
|
|
SET @UserInfoDetail = 'Reason = Login fails, Your mobile login is disabled. Please, contact your administrator.' |
|
|
@ -909,5 +933,3 @@ BEGIN CATCH |
|
|
|
,NULL ID |
|
|
|
END CATCH |
|
|
|
|
|
|
|
GO |
|
|
|
|