0

Today my client added some new users & gave them a role, and checked 'Notify user of new account'. The users clicked the email link, entered their password and all was well - except that the role they had been given had been removed, so they had no useful access. I've never seen this before, and in replicating it I can see that the role is removed at the point where the new user clicks save on their new password. I'm so puzzled by this, as we're at Drupal 7.69 which hasn't changed for a while and I can't see that anythig else has changed.

3
  • Sounds like something within your code is doing a form alter on the user edit form and unsetting the roles. Have a look around your code to look for anything like that
    – Leigh
    Commented Apr 21, 2020 at 10:56
  • There are of course modules like 'login security', 'password policies' so I will try disabling them but I've not added any code at all. It's a CiviCRM system.
    – Andy Clark
    Commented Apr 21, 2020 at 11:05
  • 1
    Thanks for the prompt Leigh - your comment directed me in the right direction.
    – Andy Clark
    Commented Apr 21, 2020 at 11:29

1 Answer 1

1

The problem was caused by the module 'Civigroup Roles Sync'. Adding the new user with a role that was synced to CiviCRM caused the user's role to be dropped because in CiviCRM they weren't in that group.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.