Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
hi,
this module seems not to work in combination with domain access. If anyone could point me into the right direction I'm willing to sacrifice some time.
Comments
Comment #1
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedI do not use the Domain access module, but the issue might be related to path access callbacks. Userprotect alters the access callbacks of the following paths in order to control edit/delete access on user accounts:
See
userprotect_menu_alter()
.If the Domain access module also modifies these paths then there could be a module conflict. If this is the case, then the issue could be solved by using a "glue" module that also alters the access callbacks of these paths, but in the implementation makes sure that access checks for both modules are performed. Be sure to make the weight of this module higher so it gets the last word.
If, on the other hand, the Domain access module provides an alternative interface for modifying user accounts then the issue should probably also be solved by using a glue module that would hook into the Domain access process and performs access checks from the userprotect module. You would need to call the functions
user_access()
,userprotect_check_bypass()
anduserprotect_get_user_protection()
for that. See for examplesuserprotect_form_user_profile_form_alter()
,userprotect_user_edit_access()
anduserprotect_user_cancel_access()
.In some rare cases the issue could be solved by adding integration code to userprotect, like is done for the modules Views Bulk Operations and RoleAssign. The requirements for integration code would be that it adds minimal complexity and an automated test to ensure the integration keeps working in the future.