X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2Fpages%2Faccount%2FMyDetailsForm.java;fp=src%2Forg%2Fcacert%2Fgigi%2Fpages%2Faccount%2FMyDetailsForm.java;h=359880b409b706c19f8a4b6563a9c6544616dac1;hp=74e454542dc8f6e6c4bdf159ce30a06ee12a759e;hb=0ecb630ef1886264eb3e49ca0438c07915fa65b7;hpb=b140228857f82ed21769d25710982706277bbd93 diff --git a/src/org/cacert/gigi/pages/account/MyDetailsForm.java b/src/org/cacert/gigi/pages/account/MyDetailsForm.java index 74e45454..359880b4 100644 --- a/src/org/cacert/gigi/pages/account/MyDetailsForm.java +++ b/src/org/cacert/gigi/pages/account/MyDetailsForm.java @@ -42,8 +42,8 @@ public class MyDetailsForm extends Form { String newLname = req.getParameter("lname").trim(); String newMname = req.getParameter("mname").trim(); String newSuffix = req.getParameter("suffix").trim(); - if (newFname.isEmpty() && !target.getFname().isEmpty()) { - throw new GigiApiException("Names couldn't be removed."); + if (newLname.isEmpty()) { + throw new GigiApiException("Last name cannot be empty."); } target.setFname(newFname); target.setLname(newLname);