[DOCU-437] New Public User Configuration Created: 17/Jul/13  Updated: 30/Dec/14  Resolved: 30/Dec/14

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: short term

Type: Task Priority: Major
Reporter: Roman Kovařík Assignee: Antti Hietala
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File PURconfiguration.png    
Issue Links:
documentation
documents MGNLPUR-93 UserProfile is instantiated directly,... Closed
documents MGNLPUR-89 Allow configuration for multiple sites Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:

 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.



 Comments   
Comment by Jan Haderka [ 24/Jul/13 ]

New configuration will be available to users as of Magnolia 4.5.10 release by the end of July. Documentation for the feature should be ideally available as the same time.

Comment by Roman Kovařík [ 24/Jul/13 ]

Please wait until MGNLPUR-93 will be closed before starting progress, the configuration can be changed.

Comment by Roman Kovařík [ 25/Jul/13 ]

Update:

  • extraUserProperties is now named autopopulatedProperties, PURconfiguration.png is not updated!.
  • added note that default properties (username, password, fullName, email) are always populated (by default).
Comment by Ruth Stocks [ 30/Dec/14 ]

Documented at:

Generated at Mon Feb 12 01:09:05 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.