eZ Platform Discussions

Change user content class for registration form

version22

#1

Hi all!

How could I change the user class for registration form? By default, the user content class is “user (ID:4)”.

I need to use my own user content class but I don’t find anywhere how to configurate this.

Ideally, I’m looking for a solution that allow me to use diferente user content class on each site_group.

Thanks!

Edit:

Ok, I found how to change the user content class using this parameter in my parameters.yml file:

ezrepoforms.user_content_type_identifier: "my_user"

My question is now: can I set this parameter for each site group?


#2

Hi @skrosoft!

Here is the documentation page in order to change the user and the user_group content types: https://doc.ezplatform.com/en/2.3/guide/configuration/#user-identifiers

You should be able to override the configuration by siteaccess.
Replace

ezsettings.default.user_content_type_identifier: ['user']

by

ezsettings.mysite.user_content_type_identifier: ['user_mysite']

Hope this helps.


#3

great, that was so obvious, thank you!


#4

I have tried all the posible settings but it’s only working with the following:

ezrepoforms.user_content_type_identifier: "my_user"

The following doesnt work.

I also tried the following in the ezplatform.yml file

parameters:
    ezsettings.default.user_content_type_identifier: ['spaceobs_user']
    ezsettings.site.user_content_type_identifier: ['spaceobs_user']
    ezsettings.site_group.user_content_type_identifier: ['spaceobs_user']

And in ezplatform.yml :

ezpublish:
    system:
        default:
            user_content_type_identifier: ['spaceobs_user']

It seems only ezrepoforms config is enabled.

Any idea? :confused: