1 Reply Latest reply on Oct 28, 2011 10:11 AM by toomtooms

    Handling user creation

    dornier_wal

      Good day.

       

      Have following question: is it possible to handle user creation moment (using user creation tool)?

      The task is to fill some external DB data for newly every created user in GateIn.

       

      Have found some info about org.exoplatform.services.organization.impl.NewUserEventListener. Am I on the right way?

        • 1. Re: Handling user creation
          toomtooms

          Hello,

           

          yes you are on the right way.

          Extend the org.exoplatform.services.organization.UserEventListener class (as org.exoplatform.services.organization.impl.NewUserEventListener does), then declare this listener in the configuration :

           

           

          {code}

          <external-component-plugins>

              <target-component>org.exoplatform.services.organization.OrganizationService</target-component>

              <component-plugin>

                <name>new.user.event.listener</name>

                <set-method>addListenerPlugin</set-method>

                <type>my.package.MyUserEventListener</type>

                <description>this listener is called when an user is created/updated/deleted</description>

              </component-plugin>

            </external-component-plugins>

          {code}

           

           

          You can now add your code before or after an user is created.