<?php
/***************************************************************************
- * Copyright (C) 2003-2011 Polytechnique.org *
+ * Copyright (C) 2003-2014 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
'exit' => $this->make_hook('exit', AUTH_PUBLIC),
'review' => $this->make_hook('review', AUTH_PUBLIC),
'deconnexion.php' => $this->make_hook('exit', AUTH_PUBLIC),
+
+ 'error' => $this->make_hook('test_error', AUTH_COOKIE),
);
}
$mymail->setFrom('"Gestion des mots de passe" <support+password@' . $globals->mail->domain . '>');
if (is_null($to)) {
$mymail->addTo($user);
- $mymail->addTo($inactives_to);
+ $log_to = $user->bestEmail();
+ if (!is_null($inactives_to)) {
+ $log_to = $inactives_to . ', ' . $log_to;
+ $mymail->addTo($inactives_to);
+ }
} else {
$mymail->addTo($to);
+ $log_to = $to;
}
$mymail->setSubject("Ton certificat d'authentification");
$mymail->setTxtBody("Visite la page suivante qui expire dans six heures :
Adresse de secours : ' . $to));
$mymail->send();
- S::logger($user->id())->log('recovery', is_null($to) ? $inactives_to . ', ' . $user->bestEmail() : $to);
+ S::logger($user->id())->log('recovery', $log_to);
}
function handler_recovery_ext($page)
}
$wiz->apply($page, 'review', $action, $mode);
}
+
+ function handler_test_error($page, $mode = null)
+ {
+ if ($mode == 'js') {
+ $page->changeTpl('platal/error.tpl');
+ } else {
+ throw new Exception("Blih");
+ }
+ }
}
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8:
?>