[cvs] eforum/src/WEB-INF/src/com/jcorporate/eforum/dbobj ForumMessage.java

JCorporate Ltd jcorp at jcorp2.servlets.net
Sun May 9 22:15:18 PDT 2004


Update of /home/javacorp/.cvs/expresso/eforum/src/WEB-INF/src/com/jcorporate/eforum/dbobj
In directory jcorp2.servlets.net:/tmp/cvs-serv22970

Modified Files:
	ForumMessage.java 
Log Message:
unknown user could break email


Index: ForumMessage.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/eforum/src/WEB-INF/src/com/jcorporate/eforum/dbobj/ForumMessage.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** ForumMessage.java	19 Mar 2004 02:21:00 -0000	1.12
--- ForumMessage.java	10 May 2004 05:15:15 -0000	1.13
***************
*** 17,20 ****
--- 17,23 ----
  // History
  //	$Log$
+ //	Revision 1.13  2004/05/10 05:15:15  dlloyd
+ //	unknown user could break email
+ //	
  //	Revision 1.12  2004/03/19 02:21:00  ppilgrim
  //	Update version to 3.2.3, added beginning of personalisation
***************
*** 379,392 ****
  		  e.hasNext(); ) {
                  oneSubscribe = (ForumSubscribe)e.next();
-                 User u = User.getUserFromId( oneSubscribe.getFieldInt(ForumSubscribe.FLD_UID),
- 					     dataContext);
  
!                 UserInfo userInfo = u.getUserInfo();
!                 if (! (User.ACTIVE_ACCOUNT_STATUS.equals(userInfo.getAccountStatus()))) {
!                     log.info("User: " + userInfo.getUid() + "(" + userInfo.getLoginName()
!                              + ") doesn't have active account status (" 
!                              + userInfo.getAccountStatus());
                  }
! 		
  		// Add an entry into the event handler to post
  		// electronic mail. The event handler will notify
--- 382,404 ----
  		  e.hasNext(); ) {
                  oneSubscribe = (ForumSubscribe)e.next();
  
!                 // We have had instances where not retrieving the User caused mail for many to not be sent
!                 // Ignore the user if he isn't found
!                 User u = null;
!                 try {
!                     u = User.getUserFromId( oneSubscribe.getFieldInt(ForumSubscribe.FLD_UID),
!                                             dataContext);
! 
!                     UserInfo userInfo = u.getUserInfo();
!                     if (! (User.ACTIVE_ACCOUNT_STATUS.equals(userInfo.getAccountStatus()))) {
!                         log.info("User: " + userInfo.getUid() + "(" + userInfo.getLoginName()
!                                  + ") doesn't have active account status (" 
!                                  + userInfo.getAccountStatus());
!                     }
! 		} catch (DBException dbe) {
!                         log.info("User: " + oneSubscribe.getFieldInt(ForumSubscribe.FLD_UID) 
!                                  + " wasn't found.");
                  }
! 
  		// Add an entry into the event handler to post
  		// electronic mail. The event handler will notify
***************
*** 394,399 ****
  		// Handler has been extended to support MIME part
  		// attachments.
!                 EventHandler.notify( dataContext, oneSubscribe.getFieldInt(FLD_EXP_UID),
!                                      msgSubject, message, attachments );
              }
  
--- 406,412 ----
  		// Handler has been extended to support MIME part
  		// attachments.
!                 if ( u != null )
!                     EventHandler.notify( dataContext, oneSubscribe.getFieldInt(FLD_EXP_UID),
!                                          msgSubject, message, attachments );
              }
  



More information about the cvs mailing list