How to grant permissions to a role in drupal 7 programmatically?

by Fawad Ali   Last Updated January 12, 2018 05:07 AM

Actually, I am working on a module and I created a list of roles and permissions. Now I can assign one or more permissions for a role and all these permissions are stored in a database table. Now I just want that how I restrict a user to some role according to these permissions. How I can apply the effect of all these permissions which I assign to these roles.enter image description here

Tags : 7 hooks

Related Questions

How to find hooks being called by a Drupal page?

Updated April 03, 2015 21:20 PM

Modify text of error message for required field

Updated April 22, 2015 20:03 PM

Where are hooks stored/cached?

Updated April 13, 2015 20:03 PM