Change username and password of other users

This commit is contained in:
Aurélie Delhaie
2022-07-14 18:33:30 +02:00
parent 8bf7c85112
commit 5d96a98b5e
21 changed files with 2960 additions and 2724 deletions

View File

@@ -58,6 +58,16 @@ namespace OpenSaveCloudClient
LockControls(false);
return;
}
if (!PasswordTool.CheckRequirements(NewPasswordBox.Text))
{
MessageBox.Show(
"Passwords need at least 6 characters",
"Change password",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
LockControls(false);
return;
}
ThreadPool.QueueUserWorkItem(delegate
{
serverConnector.ChangePassword(new NewPassword { Password = NewPasswordBox.Text, VerifyPassword = PasswordAgainBox.Text });
@@ -87,6 +97,10 @@ namespace OpenSaveCloudClient
{
valid = false;
}
else if (!PasswordTool.CheckRequirements(NewPasswordBox.Text))
{
valid = false;
}
SavePasswordButton.Enabled = valid;
}
}