The requested page is not available for the requested platform. You are viewing the content for Default platform.

SecurityStrategyComplex.CustomInitializeNewUser Event

Occurs when a user is automatically created.

Namespace: DevExpress.ExpressApp.Security

Assembly: DevExpress.ExpressApp.Security.v19.1.dll


public event EventHandler<CustomInitializeNewUserEventArgs> CustomInitializeNewUser
Public Event CustomInitializeNewUser As EventHandler(Of CustomInitializeNewUserEventArgs)

Event Data

The CustomInitializeNewUser event handler receives an argument of the DevExpress.ExpressApp.Security.CustomInitializeNewUserEventArgs type.


Use this event to setup an automatically created user and link it to necessary roles. Set the Handled parameter to true to disable the default initialization.

When the default initialization is enabled, the Security System does the following:

  1. Tries to find an object of the SecurityStrategyComplex.RoleType with a Name property value equal to a SecurityStrategyComplex.NewUserRoleName's value. If this role was not found, creates a new role with the name specified in the NewUserRoleName property and sets the role's IsAdministrative property to true.
  2. Adds a newly created user to the Users collection of the role found or created at the previous step.
See Also