Re: Use of the GATEDATE () in VerifyMailUsers Proc.

Dale E. Reed Jr. ( (no email) )
Tue, 12 May 1998 01:08:13 -0700

Barry Kiesz wrote:
>
> We are in the process of modifying the VerifyMailUser Stored Procedure to
> deny access to expired accounts. We added the last line...
>
> --
> Select Login, Shell, EMail, d.MailDomain, Password, HomeDir
> From MasterAccounts ma, SubAccounts sa, Groups g, Domains d, AccountTypes at
> Where ma.CustomerID = sa.CustomerID
> AND ma.GroupID = g.GroupID
> AND g.DomainID = d.DomainID
> AND at.AccountType = sa.AccountType
> AND at.ExternalSystemID = @esid
> AND ( ((Login=@username OR shell=@username) AND d.Domain=@domain)
> OR Email = @username + "@" + @domain )
> AND ma.maExpireDate >= GETDATE()
> GO
> ---
>
> The problem is that the users don't actually expire in Emerald until
> midnight, but in this proc. they expire at midnight the day before.. Is
> there a way to "add" a day to the GETDATE()?