File "password.inc.php"
Full Path: /srv/www/www.cadoro.it/src/controllers/password.inc.php
File size: 480 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
$confirm = false;
$errors = array();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$params = array(
'email' => _post('email'),
);
if (!$params['email'] || !($user = models\User::get_by_email($params['email']))) {
$errors['email'] = 1;
}
if (!$errors) {
$user->email_password();
$confirm = true;
}
}
$smarty->assign("confirm", $confirm);
$smarty->assign("errors", $errors);
$smarty->display("password.tmpl");
?>