You are here

function fb_permissions_update_7100 in Facebook Autopost 7

Set per-role permissions.

File

fb_permissions/fb_permissions.install, line 30
Installation file.

Code

function fb_permissions_update_7100(&$sandbox) {
  $permissions = variable_get('fb_permissions_facebook_permissions', array(
    'publish_stream',
  ));

  // We can only assume that those permissions are for all roles.
  foreach (user_roles() as $role_id => $role) {
    variable_set('fb_permissions_facebook_permissions:' . $role_id, $permissions);
  }
  variable_del('fb_permissions_facebook_permissions');
}