Add a change password at first login flag that can be set, loaded and saved. Need to use it yet.

This commit is contained in:
Tim Young 2017-08-01 11:55:22 -05:00
parent 29adb227c9
commit 8f4270a1ce

View File

@ -44,7 +44,7 @@ namespace EduNetworkBuilder
public NBSettings UserSettings = new NBSettings();
public bool ChangePassAtFirstLogin = true;
private PersonClass()
{ }
@ -121,6 +121,11 @@ namespace EduNetworkBuilder
bool.TryParse(Individual.InnerText, out isadmin);
isAdmin = isadmin;
break;
case "changepasswordatlogin":
bool changepw = false;
bool.TryParse(Individual.InnerText, out changepw);
ChangePassAtFirstLogin = changepw;
break;
case "password":
Passwords.Add(Individual.InnerText);
break;
@ -174,6 +179,7 @@ namespace EduNetworkBuilder
writer.WriteElementString("PasswordHint", PasswordHint);
writer.WriteElementString("AltPassword", AltPassword);
writer.WriteElementString("IsAdmin", isAdmin.ToString());
writer.WriteElementString("ChangePasswordAtLogin", ChangePassAtFirstLogin.ToString());
string settingsstring = NB.SerializeObject<NBSettings>(UserSettings);
writer.WriteElementString("Settings", settingsstring);