﻿CREATE PROCEDURE [REG_GetUserCredential]
	@ApiConsumerId	INT,
	@Email	NVARCHAR(50),
	@Password	VARCHAR(100) OUTPUT
AS
	DECLARE @UserId BIGINT
	
	SELECT @UserId=UserId, @Password=[Password]
	FROM Users with(nolock)
	WHERE ApiConsumerId = @ApiConsumerId AND Email = @Email;
	
	IF @UserId IS NOT NULL
	EXEC REG_GetUsers @UserId

RETURN 0
