O'Reilly logo

GateIn Cookbook by Piergiorgio Lucidi, Luca Stancapiano, Ken Finnigan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting an automatic membership after user creation

In this recipe, we will show you how to set a default membership for each new created user.

Getting ready

Locate the XML WebUI descriptor for the Organization Service at this path:

<PORTAL_WAR_ROOT>/WEB-INF/conf/organization/organization-configuration.xml

How to do it…

  1. Identify the configuration of the event for the creation of the user:
    <component-plugin>
      <name>new.user.event.listener</name>
      <set-method>addListenerPlugin</set-method>
      <type>
    org.exoplatform.services.organization.impl.NewUserEventListener
      </type>
    ...
  2. Identify, or add if not present, the field membership in the object NewUserConfig$JoinGroup and add the required values for the groupId and the membership as follows:
    <object type= "org.exoplatform.services.organization.impl.NewUserConfig$JoinGroup"> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required