' This is called from LOGON.WCC which performs the standard
' Wildcat! logon stuff.  This then checks each user against
' the 90 day limit.



'$include "prmfile.wcc"
'$include "wclistp.wcc"

OpenPrompts("wclist.prm")

'$include "wclist1.wcc"

if exists("wclist.sav") then
  end
end if

indexopen "wclist.ix1"
dim key as string
key = leftpad(str(User.UserId), 3)
if indexlookup(key) = key then
  dim NeedUpdate as integer
  NeedUpdate = False
  dim now as Date
  currentdate now
  open "wclist.dat" for random as #1 len=len(SystemInfo)
  do
    dim ref as long
    ref = indexnextref
    if ref < 0 then exit do
    dim si as SystemInfo
    get #1, ref, si
    if si.UserId > 0 then
      if now.Number - si.Verified.Number > VerifyTime then
        NeedUpdate = True
      end if
    end if
  loop
  close #1
  if NeedUpdate then
    displayfile "wclupdat"
    if inputyesno(GetText(tfUpdateNow)) then
      chain "wclist.wcx"
    end if
  end if
end if

catch err_fileopen
