More robust access checking

cdale - April 29, 2009 - 22:15
Project:Administer Users by Role
Version:6.x-1.3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Use of arg(1) inside a hook_init() can cause things to not work as expected with other contributed modules. A better method of doing the access checking is in the attached patch, and uses hook_menu_alter(), which is also a performance improvement, as the checks are no longer made on every page request, only on the pages where the checks are needed.

AttachmentSize
administerusersbyrole-menu-alter.patch2.08 KB
 
 

Drupal is a registered trademark of Dries Buytaert.