A developer enabling, then ignoring the warning from hook_enable, isn't helpful to any other admins using the site. If you used hook_requirements instead, then the status page could continue to show the warning about anonymous allowing user profile access.

Comments

matt v.’s picture

Version: 6.x-1.0 » 7.x-1.0
Component: Miscellaneous » Code
Status: Active » Needs review
StatusFileSize
new3.22 KB

I'm attaching a patch that switches from using hook_enable() to hook_requirements(), as suggested above. It also makes minor modifications to the messaging, to reflect the change in context. It also updates the README.txt to reflect where the status has been moved to.

matt v.’s picture

StatusFileSize
new6.2 KB

I updated the README.txt a bit more and changed the $requirements array key to make it easier to add more requirements later.

  • Matt V. committed c322abb on 7.x-1.x
    #1524292 Switching notification to hook_requirements instead of...

  • Matt V. committed aa03c92 on 8.x-1.x
    #1524292 Switching notification to hook_requirements instead of...
matt v.’s picture

Issue summary: View changes
Status: Needs review » Fixed

Applied to both 8.x-1.x and 7.x-1.x branches.

Status: Fixed » Closed (fixed)

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

xtfer’s picture

This has broken the installer.

Follow up #2483015: hook_requirements usage breaks installer