public function fetchCorpUsersAction() { $corp_id = Zend_Filter_Digits::filter($this->_getParam('corporation_id', 0)); //get the list of all users for the given corporation (we will remove some later). //put them in the format expected by the ajax call. $users = Application_Model_Projects::getProjectTeamAvailable(-1, $corp_id); $userObjects = array(); foreach ($users as $user) { $userObjects[$user->user_id] = array("user_id" => $user->user_id, "name" => $user->getFormattedName(Application_Model_User::LFMI), "corporation_id" => $user->Corporation->corporation_id, "corporation" => $user->Corporation->name, "assigned" => 0, "pronav_access" => $user->pronav_access); } echo Zend_Json::encode(array('state' => 1, 'users' => $userObjects)); }