Ticket #165 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Ability to change user password

Reported by: business@… Owned by: business@…
Priority: major Milestone: 0.6.1
Component: General Version:
Keywords: Cc:
Product: Operating system:
URL: Hardware:

Description

Right now I get a password emailed by the registration process, but how can I change that into something more memorable?

Change History

Changed 3 years ago by business@…

  • status changed from new to assigned
  • owner set to robert@…

Changed 3 years ago by robert@…

  • owner changed from robert@… to business@…

This feature is built into the trunk, with a 'profile' link in the login-panel-bar. Please test whether it works as required.

Changed 3 years ago by business@…

If I register with the same username or same e-mail address again, I get an error page:

 http://ci.gscf.nmcdsp.org/gscf-0.6.0-ci/userRegistration/add

Grails Runtime Exception
Error Details
Error 500: Executing action [add] of controller [dbnp.authentication.UserRegistrationController?] caused exception: Could not execute JDBC batch update; SQL [insert into registration_code (date_created, expiry_date, token, user_id, id) values (?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException?: Could not execute JDBC batch update
Servlet: grails
URI: /gscf-0.6.0-ci/grails/userRegistration/add.dispatch
Exception Message: Batch entry 0 insert into registration_code (date_created, expiry_date, token, user_id, id) values (2010-11-17 17:35:13.504000 +0100, 2010-11-20 17:35:13.488000 +0100, edb6500cff9f4185a700a6542cc09ed6, 970, 971) was aborted. Call getNextException to see the cause.
Caused by: Batch entry 0 insert into registration_code (date_created, expiry_date, token, user_id, id) values (2010-11-17 17:35:13.504000 +0100, 2010-11-20 17:35:13.488000 +0100, edb6500cff9f4185a700a6542cc09ed6, 970, 971) was aborted. Call getNextException to see the cause.
Class: UserRegistrationController?
At Line: [74]
Code Snippet:
Stack Trace

java.sql.BatchUpdateException?: Batch entry 0 insert into registration_code (date_created, expiry_date, token, user_id, id) values (2010-11-17 17:35:13.504000 +0100, 2010-11-20 17:35:13.488000 +0100, edb6500cff9f4185a700a6542cc09ed6, 970, 971) was aborted. Call getNextException to see the cause.

at org.postgresql.jdbc2.AbstractJdbc?2Statement$BatchResultHandler?.handleError(AbstractJdbc?2Statement.java:2533)

at org.postgresql.core.v3.QueryExecutorImpl?.processResults(QueryExecutorImpl?.java:1317)

at org.postgresql.core.v3.QueryExecutorImpl?.execute(QueryExecutorImpl?.java:350)

at org.postgresql.jdbc2.AbstractJdbc?2Statement.executeBatch(AbstractJdbc?2Statement.java:2592)

at org.apache.commons.dbcp.DelegatingStatement?.executeBatch(DelegatingStatement?.java:297)

at dbnp.authentication.UserRegistrationController?.sendUserConfirmationMail(UserRegistrationController?.groovy:106)

at dbnp.authentication.UserRegistrationController?.this$2$sendUserConfirmationMail(UserRegistrationController?.groovy)

at dbnp.authentication.UserRegistrationController?$_closure2.doCall(UserRegistrationController?.groovy:74)

at dbnp.authentication.UserRegistrationController?$_closure2.call(UserRegistrationController?.groovy)

at org.apache.jk.server.JkCoyoteHandler?.invoke(JkCoyoteHandler?.java:190)

at org.apache.jk.common.HandlerRequest?.invoke(HandlerRequest?.java:291)

at org.apache.jk.common.ChannelSocket?.invoke(ChannelSocket?.java:774)

at org.apache.jk.common.ChannelSocket?.processConnection(ChannelSocket?.java:703)

at org.apache.jk.common.ChannelSocket?$SocketConnection?.runIt(ChannelSocket?.java:896)

at java.lang.Thread.run(Thread.java:619)

Under some conditions the email was not event sent (e.g. when I chose a username that was used earlier, but then still if I try with another username my emailaddress seems to be already in the database and I get this error). So this should be checked more thoroughly, just display a nice error message if the username is taken already and don't register anything in the database.

Changed 3 years ago by business@…

  • owner changed from business@… to robert@…

Changed 3 years ago by robert@…

  • owner changed from robert@… to business@…

This is only a problem on the ci machine (maybe on production), because the database has changed. Locally, everything works fine. The thing that has to be changed is:

In the table registration_code the column 'username' has to be removed (a column user_id is added instead)

Changed 3 years ago by business@…

  • status changed from assigned to closed
  • resolution set to fixed

Works fine now!

Note: See TracTickets for help on using tickets.