Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCU-437

New Public User Configuration

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Major
    • short term
    • None
    • None
    • None

    Description

      Look at old Public User Configuration:
      http://demoauthor45.magnolia-cms.com/.magnolia/pages/adminCentral.html
      under Configuration:modules/public-user-registration/config

      New Public User Configuration:

      • MGNLPUR-89 allowed configuration for multiple sites (only one default site at screenshot, see attached screenshot PURconfiguration.png)
      • UserProfile class is now configured under userProfileConfiguration/userProfileClass
      • We can add autopopulatedProperties node with properties which will be automatically populated in case of custom UserProfile. Note that default properties (username, password, fullName, email) are always populated (by default).

      How to create and use custom profile class:

      1. extend info.magnolia.module.publicuserregistration.UserProfile
      2. add some extra property, you have to add its setter and getter:
      public class CustomUserProfile extends UserProfile {
      
          private String extraParameter = "";
      
          public String getExtraParameter() {
              return extraParameter;
          }
      
          public void setExtraParameter(String extraParameter) {
              this.extraParameter = extraParameter;
          }
      }
      
      1. add YOUR_PROPERTY_NAME ("extraParameter") under Configuration:modules/public-user-registration/config/configurations/NAME_OF_YOUR_SITE/userProfileConfiguration/autopopulatedProperties (see attached screenshot PURconfiguration.png)

      How to test it:

      1. add new form field named YOUR_PROPERTY_NAME ("extraParameter") to http://localhost:8080/magnoliaAuthor/demo-project/members-area/registration.html
      2. go to http://localhost:8080/magnoliaPublic/demo-project/members-area/registration.html and registrer new user
      3. go to http://localhost:8080/magnoliaPublic/.magnolia/pages/adminCentral.html, export user and check that YOUR_PROPERTY_NAME ("extraParameter") is in XML export

      In 4.5.9 and prior was not possible to use custom UserProfile class because of bug in PUR module, see MGNLPUR-93.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                ahietala Antti Hietala
                rkovarik Roman Kovařík
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoR