RE: [Emerald] Serv-U Users expire with extension

Jason Powell ( (no email) )
Mon, 10 May 1999 13:21:09 -0700

This is what I have for my stored procedure. It looks the same.
I am using Version 4.2.0.1 of emer_su.dll - could that be the prob?
----------------------------------------------------------------------------
----
if exists (select * from sysobjects where id =
object_id('dbo.VerifyFTPUser') and sysstat & 0xf = 4)
drop procedure dbo.VerifyFTPUser
GO

CREATE PROCEDURE VerifyFTPUser @username varchar(32) AS
Select Login, Shell, Password, HomeDir, HomeDirLimit
>From MasterAccounts ma, SubAccounts sa
Where ma.CustomerID = sa.CustomerID
AND sa.CustomerID=ma.CustomerID
AND (Login = @username or Shell = @username or Email = @username)
AND sa.Active<>0 AND ma.Active <> 0
AND DateAdd(Day, (ma.Extension+ma.OverDue+1), maExpireDate) >= GetDate()

GO

GRANT EXECUTE ON dbo.VerifyFTPUser TO EmeraldApps
GO
----------------------------------------------------------------------------
----
You need to update your VerifyFTPUser proc. Here is the correct one
(the
last line is the big difference).

CREATE PROCEDURE VerifyFTPUser @username varchar(32) AS
Select Login, Shell, Password, HomeDir, HomeDirLimit
From MasterAccounts ma, SubAccounts sa
Where ma.CustomerID = sa.CustomerID
AND sa.CustomerID=ma.CustomerID
AND ma.Active=1 and sa.Active=1
AND (Login = @username or Shell = @username or Email = @username)
AND sa.Active<>0 AND ma.Active <> 0
AND DateAdd(Day, (ma.Extension+ma.OverDue+1), maExpireDate) >=
GetDate()