public string UpdatePassword(string oldpassword, string newPassword) { if (string.IsNullOrEmpty(oldpassword) || string.IsNullOrEmpty(newPassword)) { return(English.PasswordIsEmpty()); } if (GlobalVariables.ActualUser.Password != new Segédfüggvények().EncryptPassword(oldpassword)) { return(English.BadOldPassword()); } if (newPassword.Length < 6 && newPassword.Length > 16) { return(English.BadPasswordLength()); } GlobalVariables.ActualUser.Password = new Segédfüggvények().EncryptPassword(newPassword); return(UpdateUser(GlobalVariables.ActualUser)); }