If it was me, I'd set the experation date in the User table to yesterday so the login becomes expired.
You can create a simple report/codeunit that can do that for you.
Sample Code
UserTable : Record of "User"
UserSetup : Record of "User Setup"
UserTable.RESET;
IF UserTable.FIND('-') THEN BEGIN
REPEAT
IF NOT UserSetup.GET(UserTable."User ID") THEN BEGIN
UserTable."Experation Date" := CALCDATE('<-1D>', TODAY);
UserTable.MODIFY;
END;
UNTIL UserTable.NEXT = 0;
END;
And then on the UserSetup table OnInsert Trigger
UserTable : Record of "User"
IF UserTable.GET("User ID") THEN BEGIN
UserTable."Experation Date" := 0D;
UserTable.Modify;
END;
This can only be run by someone who has sufficient rights to modify the User Table.
Hope this helps.
Regards,
Willy
Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
Comments
You can create a simple report/codeunit that can do that for you.
Sample Code
UserTable : Record of "User"
UserSetup : Record of "User Setup"
UserTable.RESET;
IF UserTable.FIND('-') THEN BEGIN
REPEAT
IF NOT UserSetup.GET(UserTable."User ID") THEN BEGIN
UserTable."Experation Date" := CALCDATE('<-1D>', TODAY);
UserTable.MODIFY;
END;
UNTIL UserTable.NEXT = 0;
END;
And then on the UserSetup table OnInsert Trigger
UserTable : Record of "User"
IF UserTable.GET("User ID") THEN BEGIN
UserTable."Experation Date" := 0D;
UserTable.Modify;
END;
This can only be run by someone who has sufficient rights to modify the User Table.
Hope this helps.
Regards,
Willy
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.