2
votes

Does anyone know where i can find the code that makes the user/permissions checkbox page in drupal? I'd like to see how it's done to make something similar for a custom module i'm building.

2

2 Answers

2
votes

The function you're looking for is theme_checkbox($element) and can be found in root/includes/form.inc. If you ever want to know what function/template is responsible for a certain HTML element then Theme developer is your friend.

Enable the module, set the permissions and you'll see a small checkbox Themer info. Then just point to the HTML part you're interested and see what theme function/template is doing the rendering.

0
votes

i think on default module folder there is user folder on user.admin.inc file contain code for permission function is user_admin_perm(); see this code