예제 #1
0
 public function checkEmailAction()
 {
     $this->_helper->layout->disableLayout();
     $request = $this->getRequest();
     $options = $request->getParams();
     $model = new Application_Model_User();
     if (true === $model->isExist("email='{$options['email']}'")) {
         $result = array('error' => 1, 'msg' => "Email already exists.");
     } else {
         $result = array('error' => 0, 'msg' => "Email is available!");
     }
     echo Zend_Json::encode($result);
     exit;
 }