getRequest()->getParam('id', false); $uid = !empty($uid) ? $uid : 0; $roles = Mage::getModel("api/roles") ->getCollection() ->load(); $user_roles = Mage::getModel("api/roles") ->getUsersCollection() ->setUserFilter($uid) ->load(); $this->setTemplate('api/userroles.phtml') ->assign('roles', $roles) ->assign('user_roles', $user_roles); } }