We need to create a new usergroup for the installation of our component, and the below code saves the data just as expected. However, retrieving the ID of the Usergroup for later use "isn't working".
Using JTable returns the ID, but won't fire any plugins - am I missing something obvious here in retrieving the ID of the record that the model just added?
$model = new UsersModelGroup(array('table_path' => $basePath.'/tables'));
$data = array('parent_id' => '2','title'=>'My Usergroup');
if(!$model->save($data)){
$msg = 'Usergroup was not saved: '.$model->getError();
}else{
$my_new_group_id = $model->get('id'); // Returns "null"
}