function checkphoneAction() { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(true); $formvalues = $this->_getAllParams(); $phone = trim($formvalues['phone']); // debugMessage($formvalues); $user = new UserAccount(); if (!isArrayKeyAnEmptyString('userid', $formvalues)) { $user->populate($formvalues['userid']); } if ($user->phoneExists($phone)) { echo '1'; } else { echo '0'; } }