public bool LogIn(string mail, string password) { bool ifLogsIn = false; if (users.ContainsKey(mail)) { Professional professional = users[mail]; ifLogsIn = professional.Password == password; if (ifLogsIn) { connectedUser = professional.Mail; } Console.WriteLine("Mail " + professional.Mail); } return(ifLogsIn); }
public void AddUser(string mail, string password, string name) { Professional professional = new Professional(mail, password, name); users.Add(mail, professional); }