From: Felix Dörre Date: Wed, 11 Nov 2015 19:16:20 +0000 (+0100) Subject: fix: support: no primary email address in list of secondary addresses X-Git-Url: https://code.wpia.club/?p=gigi.git;a=commitdiff_plain;h=369a3af0785742c3895a6cebe1f3c4947c195696 fix: support: no primary email address in list of secondary addresses --- diff --git a/src/org/cacert/gigi/pages/admin/support/SupportUserDetailsPage.java b/src/org/cacert/gigi/pages/admin/support/SupportUserDetailsPage.java index b0ddb8fe..a3195367 100644 --- a/src/org/cacert/gigi/pages/admin/support/SupportUserDetailsPage.java +++ b/src/org/cacert/gigi/pages/admin/support/SupportUserDetailsPage.java @@ -47,15 +47,14 @@ public class SupportUserDetailsPage extends Page { @Override public boolean next(Language l, Map vars) { - if (i == addrs.length) { - return false; + for (; i < addrs.length;) { + String address = addrs[i++].getAddress(); + if ( !address.equals(user.getEmail())) { + vars.put("secmail", address); + return true; + } } - String address = addrs[i].getAddress(); - i++; - if ( !address.equals(user.getEmail())) { - vars.put("secmail", address); - } - return true; + return false; } }); vars.put("certifrevoke", new SupportRevokeCertificatesForm(req, targetUser)); diff --git a/src/org/cacert/gigi/pages/admin/support/SupportUserDetailsPage.templ b/src/org/cacert/gigi/pages/admin/support/SupportUserDetailsPage.templ index abd4167b..84cb85e2 100644 --- a/src/org/cacert/gigi/pages/admin/support/SupportUserDetailsPage.templ +++ b/src/org/cacert/gigi/pages/admin/support/SupportUserDetailsPage.templ @@ -5,12 +5,10 @@ - -