function contact_update_7002
Enable the 'access user contact forms' for registered users by default.
Related topics
File
-
modules/
contact/ contact.install, line 136
Code
function contact_update_7002() {
// Do not use user_role_grant_permission() since it relies on
// hook_permission(), which will not run for contact module if it is
// disabled.
db_merge('role_permission')->key(array(
'rid' => DRUPAL_AUTHENTICATED_RID,
'permission' => 'access user contact forms',
'module' => 'contact',
))
->execute();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.