public function _construct() { parent::_construct(); $this->_result = ''; $this->_userId = -1; if (isset($_POST['captcha'])) { $data = $_POST['captcha']; $this->setEmail($_POST['email']); $_captcha = Mage::getModel('customer/session')->getData('form-validate-captcha_word'); if ($_captcha['data'] != $data) { $this->_result .= 'wrongcaptcha,'; } elseif ($this->isEmailExist()) { $this->_result .= 'emailisexist,'; } elseif ($this->isnotEmail($this->_userEmail) == true) { $this->_result .= 'isnotemail,'; } else { $this->_result = 'success'; } } else { $this->setEmail($_POST['email']); if ($this->isEmailExist()) { $this->_result .= 'emailisexist,'; } elseif ($this->isnotEmail($this->_userEmail) == true) { $this->_result .= 'isnotemail,'; } else { $this->_result = 'success'; } } }
public function _construct() { parent::_construct(); $this->setEmail($_POST['email']); $this->setSinglePassword($_POST['password']); if ($this->_result == '') { $this->loginUser(); } }