Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-48620

Incorrect success message after user registration



      When a guest creates a new account with login portlet, the message after successful user creation is misleading:
      Thank you for creating an account. You will be notified via email at ... when your account has been approved.

      (See the "your account has been approved" text)

      However, If admin does not set workflow, the new account should not be approved. It can be checked with trying to log in with the new account.

      steps to reproduce

      1. create an account as guest with login portlet
      2. check the message after successful account creation
      experienced behaviour

      Thank you for creating an account. You will be notified via email at ... when your account has been approved.

      expected behaviour

      Thank you for creating an account. Your password is .... Your password has been sent to .....


      • This issue is fixed on trunk by a story (LPS-45630), which modifies a lot of code. Because we do not have the chance to ask for backport of story tickets, I had to open this new LPS.
      • LPS-45630 resolves this issue by returning the updated user object from startWorkflowInstance, however it needs many changes.

      cause of the issue

      In UserLocalServiceImpl.addUserWithWorkflow method WorkflowHandlerRegistryUtil.startWorkflowInstance is called which sets the user.status. This method persists the user, however the modified user object is not returned to addUserWithWorkflow. So when addUserWithWorkflow method returns with the user object, it has PENDING status (which is the default).

      Unfortunately this bad pattern (calling startWorkflowInstance and not dealing with modified object) repeats at some places in portal's code, see for example BlogsEntryLocalServiceImpl.addEntry.

      A good pattern can be found here: JournalArticelLocalServiceImpl.addArticel


        1. fixed.png
          129 kB
        2. reproduced.png
          131 kB

          Issue Links



              felix.zhang Felix Zhang
              peter.borkuti Peter Borkuti (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              0 Vote for this issue
              2 Start watching this issue


                Days since last comment:
                7 years, 18 weeks, 3 days ago


                  Version Package
                  6.1.X EE