function fb_permissions_update_7101 in Facebook Autopost 7
Set per-role permissions.
File
- fb_permissions/
fb_permissions.install, line 42 - Installation file.
Code
function fb_permissions_update_7101(&$sandbox) {
// We can only assume that those permissions are for all roles.
foreach (user_roles() as $role_id => $role) {
$permissions = variable_get('fb_permissions_facebook_permissions:' . $role_id, array(
'publish_actions',
));
$key = array_search('publish_stream', $permissions);
if ($key !== FALSE) {
unset($permissions[$key]);
variable_set('fb_permissions_facebook_permissions:' . $role_id, $permissions);
}
}
}