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

Shibboleth registration: deprecated method is used

    XMLWordPrintable

    Details

      Description

      The deprecated method UserManager.getInstance().findUserByEmail(email) is used in ShibbolethRegistrationController. This patch fixes that:

      diff -r ef5c3a6b58e6 src/main/java/org/olat/shibboleth/ShibbolethRegistrationController.java
      --- a/src/main/java/org/olat/shibboleth/ShibbolethRegistrationController.java	Tue Dec 16 12:49:53 2014 +0100
      +++ b/src/main/java/org/olat/shibboleth/ShibbolethRegistrationController.java	Wed Dec 17 09:53:44 2014 +0100
      @@ -331,7 +337,11 @@
       						email = ShibbolethHelper.getFirstValueOf(ShibbolethModule.getEMail(), shibbolethAttributesMap);
       					}
       
      -					User user = UserManager.getInstance().findUserByEmail(email);
      +					User user = null;
      +					Identity id = UserManager.getInstance().findIdentityByEmail(email);
      +					if (id != null) {
      +						user = id.getUser();
      +					}
       					
       					if (user != null) {
       						// error, email already exists. should actually not happen if OLAT Authenticator has
      

        Attachments

          Activity

            People

            • Assignee:
              srosse Stéphane Rossé
              Reporter:
              stephan Stephan Clemenz
              Tester:
              Stephan Clemenz
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 10 minutes
                10m