When i add a menu link (example: /user/register/company) gives me this error in every page that the menu is loaded:
Deprecated function: Non-static method Drupal\user\Access\RegisterAccessCheck::access() should not be called statically in Drupal\multiple_registration\Controller\MultipleRegistrationController->access() (line 61 of modules/contrib/multiple_registration/src/Controller/MultipleRegistrationController.php).
If the current user is not UID 1 user.
Comments
Comment #2
joao.ramos.costa commentedmultiple_registration.routing.yml
multiple_registration.role_registration_page:
path: 'user/register/{rid}'
defaults:
_entity_form: 'user.register'
_title_callback: '\Drupal\multiple_registration\Controller\MultipleRegistrationController::getRegisterPageTitle'
requirements:
_custom_access: '\Drupal\multiple_registration\Controller\MultipleRegistrationController::access'
I changed the requeriments:
_custom_acess : '...'
for _permission: 'access content'
(the permission that i want in fact, and it worked well )
I guess the problem is in in the custom requirement;
I will try to solve it and i'll try to patch it.
Comment #3
IreneV commentedThank you for reporting this bug!
This issue already fixed in latest dev version. Will be added into next release.
Comment #4
ysamoylenko commentedHi joao.ramos.
The problem was following to static call to the public function /core/modules/user/src/Access/RegisterAccessCheck.php:23.
Currently, I've fixed the problem and pushed the changes to the dev release.
Please download the latest version of the module and check the problem again.
Thank you for the report.
Comment #5
joao.ramos.costa commentedThank you for your help!