Minor: This whole function could a one liner, without variables.
``user_role_revoke_permissions(DRUPAL_AUTHENTICATED_RID, array('view user profiles'));``