Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-341

Add method to load identity from a given user, replace locations where the find-by-email was used for this purpose

    XMLWordPrintable

    Details

      Description

      In the error below the find by email did not find a user. It is unclear how this can happen at all, however using the find by email method is wrong anyway. In the said code the user object is available and thus the corresponding identity could be looked up easily.

      It turns out that there is no method neither in the BaseSecurityManager nor the UserManager for this purpose.

      1) Add a method to get the identity for a given user object. I would put it to the BaseSecurityManager
      2) Search the code for wrong usages of the find by email method and replace it with the new one where feasible

      stack of 1.cause::org.olat.core.logging.AssertException: Identity cannot be searched by email, if email is not valid. Used address: null ->
      at org.olat.user.UserManagerImpl.findIdentityByEmail(UserManagerImpl.java:126)
      at org.olat.user.propertyhandlers.DateDisplayPropertyHandler.getDateValue(DateDisplayPropertyHandler.java:58)
      at org.olat.user.propertyhandlers.DateDisplayPropertyHandler.getUserProperty(DateDisplayPropertyHandler.java:72)
      at org.olat.user.UserImpl.getProperty(UserImpl.java:164)
      at org.olat.admin.user.bulkChange.UserBulkChangeManager.setUserContext(UserBulkChangeManager.java:254)
      at org.olat.admin.user.bulkChange.UserBulkChangeStep02$UserBulkChangeStepForm02.initForm(UserBulkChangeStep02.java:203)
      at org.olat.core.gui.components.form.flexible.impl.FormBasicController.initForm(FormBasicController.java:212)
      at org.olat.admin.user.bulkChange.UserBulkChangeStep02$UserBulkChangeStepForm02.<init>(UserBulkChangeStep02.java:132)
      at org.olat.admin.user.bulkChange.UserBulkChangeStep02.getStepController(UserBulkChangeStep02.java:115)
      at org.olat.core.gui.control.generic.wizard.StepsMainRunController$4.createController(StepsMainRunController.java:356)
      at org.olat.core.gui.control.generic.wizard.StepsMainRunController.event(StepsMainRunController.java:420)

        Attachments

          Activity

            People

            • Assignee:
              srosse Stéphane Rossé
              Reporter:
              gnaegi Florian Gnägi
              Tester:
              Florian Gnägi
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 hours Original Estimate - 2 hours
                2h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 10 minutes
                2h 10m