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:
parent
29adb227c9
commit
8f4270a1ce
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user