Make it work with Administer Users by Role

Created on 24 April 2015, over 9 years ago
Updated 8 July 2024, 5 months ago

Thanks for such a great module, it's been really helpful to my project! So, I found myself in a situation where I needed a role specific user to create new users. The 'administer users' permission is way too dangerous, so I installed the Administer Users by Role module.

When referencing a user on a node with an entity reference field this module worked well with my administrators permission. But the add button didn't show up for a user that had the 'create new user' role via the Administer Users by Role module.

After some searching, I found that line 186 of entityconnect.module could be changed from:

if (user_access('administer users') && (user_access('entityconnect add button') || user_access('entityconnect edit button'))) {

to

if (user_access('create users') && (user_access('entityconnect add button') || user_access('entityconnect edit button'))) {

This allows this module to work with the Administer Users by Role module. I'm going to keep this hack live on my site for now, but would it be possible to add this as an option that could be changed somewhere? I'm sorry that I can't be of more help that this, unfortunately my cutting and pasting skills are much better than my PHP.

✨ Feature request
Status

Closed: outdated

Version

2.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom cockers

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡¦Ukraine AstonVictor

    I'm closing it because the issue was created a long time ago without any further steps.

    if you still need it then raise a new one.
    thanks

Production build 0.71.5 2024