Skip to content
Snippets Groups Projects
Commit d37ed132 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Use the new userdat api functions: del_user() and undel_user()

Display the user's deletion date (when available) - always displayed in
numeric format because datestr() takes a time_t argument and Borland's time_t
is just 32-bits still.

Fix typo in "Active User" string
parent ba963b52
No related branches found
No related tags found
No related merge requests found
......@@ -229,13 +229,16 @@ void __fastcall TMainForm::GetUserData(int number)
ChatCheckListBox->Tag = false;
if(user.misc & DELETED) {
Status->Text = "Deleted User";
if(user.deldate)
Status->Text = "Deleted " + AnsiString(unixtodstr(&cfg, user.deldate, tmp));
else
Status->Text = "Deleted User";
Status->Color = clRed;
} else if(user.misc & INACTIVE) {
Status->Text = "Inactive User";
Status->Color = clYellow;
} else {
Status->Text = "Active Uesr";
Status->Text = "Active User";
Status->Color = clMenu;
}
......@@ -535,11 +538,11 @@ void __fastcall TMainForm::NewUserExecute(TObject *Sender)
//---------------------------------------------------------------------------
void __fastcall TMainForm::DeleteUserExecute(TObject *Sender)
{
user.misc ^= DELETED;
putusermisc(&cfg, ScrollBar->Position, user.misc);
LogonCheckListBox->Tag = true; // flag as modified
AliasEdit->Tag = true;
PutUserData(ScrollBar->Position);
if(user.misc & DELETED)
undel_user(&cfg, &user);
else
del_user(&cfg, &user);
GetUserData(ScrollBar->Position);
}
//---------------------------------------------------------------------------
void __fastcall TMainForm::DeactivateUserExecute(TObject *Sender)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment