autoassignrole_content_profile_settings can result in multiple calls to user_roles which results in a database hit. A static cache can be introduced. Patch attached.

Comments

cyberswat’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

recrit’s picture

Version: 6.x-1.1 » 6.x-1.x-dev
StatusFileSize
new519 bytes

the patch above does not work. It changes the settings array key from 'autoassignrole_use' to 'values', therefore, the saved value never gets used since all forms and references look for 'autoassignrole_use'. The attached patch changes it back and is applied to 6.x-1.x-dev

recrit’s picture

Status: Closed (fixed) » Needs review

changing status to needs review

fenstrat’s picture

Category: feature » bug
Status: Needs review » Reviewed & tested by the community

Confirmed, the changes in the first patch above will never work as it changes the array key from 'autoassignrole_use' to 'values'.

The patch in #3 fixes the problem.

fenstrat’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

Hmm, appears this was already fixed #755308: Content profile settings are not saved