/** * Init. */ public function _construct() { parent::_construct(); // Result for Javascript $this->_result = ''; $this->_userId = -1; // Terms and conditions has been accepted if ($_POST['licence'] == 'ok') { $this->setEmail($_POST['email']); // If this email is already exist if ($this->isEmailExist()) { $this->_result .= 'emailisexist,'; // If this email is not exist yet. } else { $this->setPassword($_POST['password'], $_POST['passwordsecond']); $this->setName($_POST['firstname'], $_POST['lastname']); $this->setNewsletter($_POST['newsletter']); // If there are no errors if ($this->_result == '') { // Try register user $this->_registerUser(); // Try subscribe user to newsletter if ($this->_userNewsletter == true) { $this->_subscribeUser(); } } } // Terms and conditions has not been accepted } else { $this->_result = 'nolicence,'; } }
public function _construct() { parent::_construct(); $this->setEmail($_POST['email']); $this->setSinglePassword($_POST['password']); if ($this->_result == '') { $this->loginUser(); } }
public function _construct() { parent::_construct(); $this->_result = ''; $this->_userId = -1; if ($_POST['licence'] == 'ok') { $this->setEmail($_POST['email']); if ($this->isEmailExist()) { $this->_result .= 'emailisexist,'; } else { $this->setPassword($_POST['password'], $_POST['passwordsecond']); $this->setName($_POST['firstname'], $_POST['lastname']); $this->setNewsletter($_POST['newsletter']); if ($this->_result == '') { $this->registerUser(); if ($this->_userNewsletter == true) { $this->subscribeUser(); } } } } else { $this->_result = 'nolicence,'; } }