Not a lot of support for the plug-in!
Anyway, if anyone else needs help, I’ve add the following function to my functions.php file in order to change the group the individual belongs too based upon a variable ‘record-status’ that is posted.
function UserUAgroupAccess() {
$record_status = $_POST[‘record_status’];
// grab the values we need
$email = $_POST[’email’];
// Now obtain the User’s User ID
$the_user = get_user_by(’email’, $email);
$wp_uid = $the_user->ID;
$userGroupId=2; // Group ID to be updated
// Now set the user’s permissions to have access to the pages
global $oUserAccessManager;
if (isset($oUserAccessManager)) {
$oUamAccessHandler = $oUserAccessManager->getAccessHandler();
$uamUserGroup = $oUamAccessHandler->getUserGroups($userGroupId);
if ($record_status == “Archived” OR $record_status == “Pending” OR $record_status == “Rejected”) {
$uamUserGroup->removeObject(‘user’, $wp_uid);
} else {
$uamUserGroup->addObject(‘user’, $wp_uid);
}
$uamUserGroup->save();
}
// make sure we return the posted values to ensure the plugin that we have hooked in front of will continue to function properly
return ($_POST);
}