/** * Tests if the mail address given by the user exists in the database. **/ public function controlRecoverPassword() { $accountModel = new AccountModel(); $accountView = new AccountView(); $_POST['mail'] = htmlspecialchars($_POST['mail']); if ($accountModel->getDataUser('*', $_POST['mail'])) { $accountModel->recoverPassword($_POST['mail']); } else { $accountView->showMessage("Votre adresse e-mail est incorrecte."); } }