Update of 
/var/cvs/contributions/CMSContainer_Portlets/portlets-login/src/java/com/finalist/cmsc/portlets
In directory 
james.mmbase.org:/tmp/cvs-serv24802/portlets-login/src/java/com/finalist/cmsc/portlets

Modified Files:
        RegisterPortlet.java 
Log Message:
CMSC-1320 - Registration portlets needed improvements; added null-checks


See also: 
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Portlets/portlets-login/src/java/com/finalist/cmsc/portlets
See also: http://www.mmbase.org/jira/browse/CMSC-1320


Index: RegisterPortlet.java
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer_Portlets/portlets-login/src/java/com/finalist/cmsc/portlets/RegisterPortlet.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- RegisterPortlet.java        5 Mar 2009 10:52:02 -0000       1.1
+++ RegisterPortlet.java        5 Mar 2009 11:13:47 -0000       1.2
@@ -114,6 +114,12 @@
          Authentication authentication = 
authenticationService.createAuthentication(email, passwordText);
          if (authentication.getId() != null) {
             authId = authentication.getId();
+
+            //If the names are not needed in the form, they can be emptied and 
stored.
+            if (firstName == null) firstName="";
+            if (infix == null) infix="";
+            if (lastName == null) lastName = "";
+            
             Person person = personHibernateService.createPerson(firstName, 
infix, lastName, authId, RegisterStatus.UNCONFIRMED.getName(), new Date());
             person.setEmail(email);
             personHibernateService.updatePerson(person);
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to