<?php
class Teamspeak_Model_User extends XFCP_Teamspeak_Model_User
{
protected function _applyUserGroupChanges($userId, array $oldGroupStrings, array $newGroupStrings)
{
$response = parent::_applyUserGroupChanges($userId, $oldGroupStrings, $newGroupStrings);
$auth_id = $this->_getAccountModel()->getAuthID($response['user_id']);
if ($auth_id)
{
$stored_info = $this->_getAccountModel()->checkIdentities($userId, $auth_id);
$teamspeak = $this->getHelper("Teamspeak_Helper_Query");
$teamspeak->_updateServerGroup($user_id, $auth_id, $stored_info['auth_id']);
}
return $response;
}
protected function _getAccountModel()
{
return $this->getModelFromCache('Teamspeak_Model_Account');
}
}