Forums

Home » Liferay Portal » English » Liferay Legacy

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Joshua Asbury
Captured User Data
November 29, 2006 9:12 AM
Answer

Joshua Asbury

LIFERAY STAFF

Rank: Expert

Posts: 497

Join Date: September 8, 2006

Recent Posts

Hi all -

I am wondering how I can remove the Birthday and Gender fields from the user creation and user administration screens. Our legal department doesn't want that information to be collected.

Also, how do I go about creating a custom field that a user must enter when creating their own login ID? We wish to be able to validate our customers against a custom table of company-internal customer IDs, and I want to require users to enter that number before they can create a user ID for themselves.

Thanks!
Josh
Joseph Shum
RE: Captured User Data
November 29, 2006 11:49 AM
Answer

Joseph Shum

LIFERAY STAFF

Rank: Expert

Posts: 336

Join Date: May 16, 2006

Recent Posts

Hey Josh,

you can override create_account.jsp and remove the 2 fields but it looks like you also want some customization to the liferay user creation process. look at the my_account portlet. you may need to extend that if you are developing in ext.
Joshua Asbury
RE: Captured User Data
December 11, 2006 10:57 AM
Answer

Joshua Asbury

LIFERAY STAFF

Rank: Expert

Posts: 497

Join Date: September 8, 2006

Recent Posts

Thanks, Joseph. I removed the fields, and tried to modify the JSP further by adding the "Comments" ui component, but problems have arisen as a resul. It looks like the dates are hardcoded into the portlet and SQL Exceptions are occurring (see below).

Do you know of any way around this short of customizing the portlet code (I'm really trying to avoid this since I want my LifeRay install to be as pure as possible).

Thanks!
Josh

  1
  213:51:00,371 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: 22003
  313:51:00,371 ERROR [JDBCExceptionReporter] Only dates between January 1, 1753 and December 31, 9999 are accepted.
  413:51:00,371 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
  5org.hibernate.exception.DataException: could not insert: [com.liferay.portal.model.Contact]
  6    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)
  7    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
  8    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2140)
  9    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2503)
 10    at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:51)
 11    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
 12    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
 13    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
 14    at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297)
 15    at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
 16    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:993)
 17    at com.liferay.portal.service.persistence.ContactPersistence.update(ContactPersistence.java:118)
 18    at com.liferay.portal.service.persistence.ContactUtil.update(ContactUtil.java:133)
 19    at com.liferay.portal.service.impl.UserLocalServiceImpl.addUser(UserLocalServiceImpl.java:293)
 20    at com.liferay.portal.service.impl.UserLocalServiceImpl.addUser(UserLocalServiceImpl.java:150)
 21    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 22    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 23    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 24    at java.lang.reflect.Method.invoke(Method.java:324)
 25    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
 26    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
 27    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
 28    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
 29    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
 30    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
 31    at $Proxy401.addUser(Unknown Source)
 32    at com.liferay.portal.service.ejb.UserLocalServiceEJBImpl.addUser(UserLocalServiceEJBImpl.java:83)
 33    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 34    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 35    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 36    at java.lang.reflect.Method.invoke(Method.java:324)
 37    at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
 38    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
 39    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
 40    at org.jboss.ws.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:64)
 41    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
 42    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
 43    at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:173)
 44    at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:77)
 45    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
 46    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
 47    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
 48    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
 49    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
 50    at org.jboss.ejb.Container.invoke(Container.java:954)
 51    at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
 52    at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
 53    at $Proxy299.addUser(Unknown Source)
 54    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 55    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 56    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 57    at java.lang.reflect.Method.invoke(Method.java:324)
 58    at org.springframework.ejb.access.LocalSlsbInvokerInterceptor.invoke(LocalSlsbInvokerInterceptor.java:66)
 59    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
 60    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
 61    at $Proxy400.addUser(Unknown Source)
 62    at com.liferay.portal.service.spring.UserLocalServiceUtil.addUser(UserLocalServiceUtil.java:105)
 63    at com.liferay.portal.service.impl.UserServiceImpl.addUser(UserServiceImpl.java:106)
 64    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 65    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 66    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 67    at java.lang.reflect.Method.invoke(Method.java:324)
 68    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
 69    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
 70    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
 71    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
 72    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
 73    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
 74    at $Proxy484.addUser(Unknown Source)
 75    at com.liferay.portal.service.ejb.UserServiceEJBImpl.addUser(UserServiceEJBImpl.java:88)
 76    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 77    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 78    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 79    at java.lang.reflect.Method.invoke(Method.java:324)
 80    at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
 81    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
 82    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
 83    at org.jboss.ws.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:64)
 84    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
 85    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
 86    at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:173)
 87    at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:77)
 88    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
 89    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
 90    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
 91    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
 92    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
 93    at org.jboss.ejb.Container.invoke(Container.java:954)
 94    at sun.reflect.GeneratedMethodAccessor221.invoke(Unknown Source)
 95    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 96    at java.lang.reflect.Method.invoke(Method.java:324)
 97    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
 98    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
 99    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
100    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
101    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
102    at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
103    at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
104    at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:206)
105    at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:192)
106    at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
107    at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
108    at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
109    at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
110    at $Proxy301.addUser(Unknown Source)
111    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
112    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
113    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
114    at java.lang.reflect.Method.invoke(Method.java:324)
115    at org.springframework.remoting.rmi.RmiClientInterceptorUtils.doInvoke(RmiClientInterceptorUtils.java:98)
116    at org.springframework.ejb.access.SimpleRemoteSlsbInvokerInterceptor.doInvoke(SimpleRemoteSlsbInvokerInterceptor.java:75)
117    at org.springframework.ejb.access.AbstractRemoteSlsbInvokerInterceptor.invoke(AbstractRemoteSlsbInvokerInterceptor.java:114)
118    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
119    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
120    at $Proxy483.addUser(Unknown Source)
121    at com.liferay.portal.service.spring.UserServiceUtil.addUser(UserServiceUtil.java:105)
122    at com.liferay.portlet.myaccount.action.AddUserAction.addUser(AddUserAction.java:161)
123    at com.liferay.portlet.myaccount.action.AddUserAction.processAction(AddUserAction.java:79)
124    at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcessor.java:173)
125    at com.liferay.portlet.StrutsPortlet.processAction(StrutsPortlet.java:95)
126    at com.liferay.portlet.CachePortlet._invoke(CachePortlet.java:319)
127    at com.liferay.portlet.CachePortlet.processAction(CachePortlet.java:144)
128    at com.liferay.portal.action.LayoutAction._processPortletRequest(LayoutAction.java:232)
129    at com.liferay.portal.action.LayoutAction._processActionRequest(LayoutAction.java:250)
130    at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:86)
131    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
132    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
133    at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:189)
134    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
135    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
136    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
137    at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:437)
138    at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:825)
139    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
140    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
141    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
142    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
143    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
144    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
145    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
146    at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:133)
147    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
148    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
149    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
150    at com.liferay.filters.strip.StripFilter.doFilter(StripFilter.java:94)
151    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
152    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
153    at com.liferay.filters.secure.SecureFilter.doFilter(SecureFilter.java:143)
154    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
155    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
156    at com.liferay.filters.compression.CompressionFilter.doFilter(CompressionFilter.java:115)
157    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
158    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
159    at com.liferay.portal.servlet.filters.layoutcache.LayoutCacheFilter.doFilter(LayoutCacheFilter.java:205)
160    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
161    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
162    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
163    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
164    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
165    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
166    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
167    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
168    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
169    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
170    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
171    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
172    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
173    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
174    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
175    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
176    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
177    at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
178    at java.lang.Thread.run(Thread.java:534)
179Caused by: java.sql.SQLException: Only dates between January 1, 1753 and December 31, 9999 are accepted.
180    at net.sourceforge.jtds.jdbc.DateTime.packDate(DateTime.java:300)
181    at net.sourceforge.jtds.jdbc.DateTime.<init>(DateTime.java:121)
182    at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.setParameter(JtdsPreparedStatement.java:361)
183    at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.setTimestamp(JtdsPreparedStatement.java:757)
184    at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setTimestamp(WrappedPreparedStatement.java:368)
185    at org.hibernate.type.TimestampType.set(TimestampType.java:45)
186    at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:83)
187    at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:60)
188    at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:1910)
189    at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:1887)
190    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2117)
191    ... 170 more
Elisabeth VanSchaardenburg
RE: Captured User Data
December 11, 2006 11:57 AM
Answer

Elisabeth VanSchaardenburg

Rank: Regular Member

Posts: 184

Join Date: May 23, 2006

Recent Posts

Josh,

With regard to omitting gender and birthdate information, did you try setting these properties in your portal-ext.properties file (rather than modify the JSP)?

##
## Fields
##

#
# Set the following fields to false so users cannot see them. Some company
# policies require gender and birthday information to always be hidden.
#
field.enable.com.liferay.portal.model.Contact.male=false
field.enable.com.liferay.portal.model.Contact.birthday=false


Elisabeth
Joshua Asbury
RE: Captured User Data
December 11, 2006 3:03 PM
Answer

Joshua Asbury

LIFERAY STAFF

Rank: Expert

Posts: 497

Join Date: September 8, 2006

Recent Posts

Elisabeth -

That did the trick.

Thanks!!
Ashok Sangi
RE: Captured User Data
April 13, 2012 6:29 AM
Answer

Ashok Sangi

Rank: New Member

Posts: 10

Join Date: November 21, 2011

Recent Posts

Hi Elisabeth ,

i have been hide the gender and birth day by setting the

field.enable.com.liferay.portal.model.Contact.male=false
field.enable.com.liferay.portal.model.Contact.birthday=false

in portal-ext.properties file but iam getting ContactBirthDayException is there any modifications i will do please reply i am waiting for your ans......