/*
  * (non-Javadoc)
  *
  * @see is.idega.idegaweb.member.presentation.UserEditor#getCommune(com.idega.user.data.User)
  */
 protected Commune getCommune(IWContext iwc, User user) {
   try {
     if (user != null) {
       CommuneUserBusiness communeUserService = getCommuneUserService(iwc);
       Group communeGroup = communeUserService.getRootCitizenGroup();
       Integer ID =
           communeGroup != null ? (Integer) communeGroup.getPrimaryKey() : new Integer(-1);
       if (user.getPrimaryGroupID() == ID.intValue() || user.hasRelationTo(communeGroup)) {
         if (super.showDefaultCommuneOption) {
           return getCommuneBusiness(iwc).getCommuneHome().findDefaultCommune();
         } else {
           return null;
         }
       }
     }
   } catch (Exception e) {
     e.printStackTrace(System.err);
   }
   return null;
 }