If you keep user information in database, you can have a column like
UserStatus
. In the code, it should be something like enumeration a bit set:
[System.Flags] enum UserStatus {
None = 0,
ApprovalPending = 1,
Logged = 2,
Initial = ApprovalPending,
}
UserStatus userStatus = UserStatus.Initial;
bool approvalPending == (userStatus & UserStatus.ApprovalPending) > 0;
userStatus |= UserStatus.ApprovalPending;
userStatus ^= UserStatus.ApprovalPending;
Your database can store one numeric value in this column, a bitwise combination of
UserStatus
enumeration values, you can cast it from numeric type to
UserStatus
and back.
For approvals and other administrative actions, you can have a special administration Web page, say, password protected, or devise a special database access application accessible only within the local network.
—SA