Basically, you're going to want to use an extension that hooks this:
member_update_start
https://ellislab.com/expressionengine/user-guide/development/extension_hooks/global/member_model/index.html#member-update-start
A in your extension, do something like this (pseudo code, don't got time to write up a full thing for you):
function check_tos_member_update_start($member_id, $data)
{
$old_member_gr = ee()->db->select('member_group')
->from('exp_members')
->where('member_id', $member_id)
->get->row_array();
if ($old_member_gr['member_group'] != $data['member_group'])
{
// our user has changed their member group
// here, you could insert a row into a custom table
// that says member_id, and flag a "changed column",
// and the new group
}
}
Then, you could write another function in this extension that hooks on to (one of the member_login hooks, just picking this one):
member_member_login_single
https://ellislab.com/expressionengine/user-guide/development/extension_hooks/module/member_auth/index.html#member-member-login-start
that does something like this:
function check_tos_member_member_login_single($hook_data)
{
$check = ee()->db->select('changed_column')
->from('exp_check_tos') // custom table
->get->row_array();
// did we submit with a checked TOS?
if (ee()->input->post('new_TOS))
{
// delete my flagged row from exp_check_tos!
}
// if not are we flagged for NEEDING one?
else if ($check['changed_column'] == "true")
{
if (!ee()->input->post('new_TOS'))
{
// didn't recheck the TOS !!!
// redirect to login form with TOS flag
ee()->function->redirect('login-form?tos=1');
}
}
}
And then you can use the input class in your login form to see if they are flagged to recheck their TOS (I forget the login form tag so I'm making it up):
{exp:login:form}
<?php
if (ee()->input->get('tos'))
{
?>
<input type="checkbox" name="new_TOS">
<?php
}
?>
{/exp:login:form}
Yea, that's kinda a convoluted answer, but I basically thought out your custom addon for you :)