]> WPIA git - gigi.git/commitdiff
FIX: Secoundary EMail display
authorJanis Streib <janis@dogcraft.de>
Fri, 16 Jan 2015 13:00:38 +0000 (14:00 +0100)
committerJanis Streib <janis@dogcraft.de>
Wed, 21 Jan 2015 00:28:08 +0000 (01:28 +0100)
src/org/cacert/gigi/pages/admin/support/SupportUserDetailsPage.java
src/org/cacert/gigi/pages/admin/support/SupportUserDetailsPage.templ

index fccdd5ee2121fbc6af5db801e468dab3e175b5d6..5792532576feaa23de4cd99177e552ef0c384fb5 100644 (file)
@@ -38,12 +38,15 @@ public class SupportUserDetailsPage extends Page {
 
             @Override
             public boolean next(Language l, Map<String, Object> vars) {
+                if (i == addrs.length) {
+                    return false;
+                }
                 String address = addrs[i].getAddress();
+                i++;
                 if ( !address.equals(user.getEmail())) {
                     vars.put("secmail", address);
                 }
-                i++;
-                return i != addrs.length - 1;
+                return true;
             }
         });
         vars.put("certifrevoke", new SupportRevokeCertificatesForm(req, user));
index 8eed2bb35494278ca5b994757e7bafd253a681be..fa874c40e881de46c24946e8827a7646969c3c5d 100644 (file)
@@ -4,10 +4,12 @@
             <th><?=_Alternate Verified Email Addresses?></th>
         </tr>
         <? foreach($emails) {?>
+        <? if($secmail) { ?>
         <tr>
             <td><?=$secmail?></td>
         </tr>
         <? } ?>
+        <? } ?>
         </tbody>
 </table>
 <br/>