public ModelResponse execute(ModelRequest req) throws ModelException
{
try
{
UserRegistry iritgoUsers = Server.instance().getUserRegistry();
AktarioUserRegistry aktarioUsers = ((AktarioUserManager) Engine.instance().getManager("AktarioUserManager"))
.getUserRegistry();
AktarioUserManager aktarioUserManager = (AktarioUserManager) Engine.instance().getManager(
"AktarioUserManager");
int userId = NumberTools.toInt(req.getParameter("id"), - 1);
if (userId != - 1)
{
PersistentFactory persistentManager = (PersistentFactory) req.getService(PersistentFactory.ROLE, req
.getDomain());
Persistent user = persistentManager.create("keel.user");
user.setField("uid", new Integer(userId));
if (user.find())
{
AktarioUser aktarioUser = aktarioUsers.getUserByName(user.getFieldString("name"));
if (aktarioUser != null)
{
aktarioUserManager.delUser(aktarioUser);
}