+ public User getSupporter() {
+ if (supporter != null) {
+ return supporter;
+ }
+ try {
+ User u = createAssurer( -1);
+ if ( !u.isInGroup(Group.SUPPORTER)) {
+ try (GigiPreparedStatement ps = new GigiPreparedStatement("INSERT INTO `user_groups` SET `user`=?, `permission`=?::`userGroup`, `grantedby`=?")) {
+ ps.setInt(1, u.getId());
+ ps.setString(2, Group.SUPPORTER.getDBName());
+ ps.setInt(3, u.getId());
+ ps.execute();
+ }
+ u.refreshGroups();
+ }
+ supporter = u;
+ } catch (ReflectiveOperationException | GigiApiException e) {
+ e.printStackTrace();
+ }
+ return supporter;
+ }
+