mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 19:43:16 +00:00
@@ -117,7 +117,7 @@ class Authenticator
|
|||||||
*/
|
*/
|
||||||
public function closeAccount()
|
public function closeAccount()
|
||||||
{
|
{
|
||||||
$this->session->clear();
|
$this->session->invalidate();
|
||||||
$this->reinitUser();
|
$this->reinitUser();
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
@@ -631,7 +631,7 @@ class Login implements ControllerProviderInterface
|
|||||||
$app['dispatcher']->dispatch(PhraseaEvents::LOGOUT, new LogoutEvent($app));
|
$app['dispatcher']->dispatch(PhraseaEvents::LOGOUT, new LogoutEvent($app));
|
||||||
$app['authentication']->closeAccount();
|
$app['authentication']->closeAccount();
|
||||||
|
|
||||||
$app->addFlash('info', 'Vous etes maintenant deconnecte. A bientot.');
|
$app->addFlash('info', _('Vous etes maintenant deconnecte. A bientot.'));
|
||||||
|
|
||||||
$response = new RedirectResponse($app->path('root', array(
|
$response = new RedirectResponse($app->path('root', array(
|
||||||
'redirect' => $request->query->get("redirect")
|
'redirect' => $request->query->get("redirect")
|
||||||
|
@@ -57,8 +57,8 @@ class LoginTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
|||||||
*/
|
*/
|
||||||
public function testLoginError($type, $message)
|
public function testLoginError($type, $message)
|
||||||
{
|
{
|
||||||
self::$DI['app']->addFlash($type, $message);
|
|
||||||
self::$DI['app']['authentication']->closeAccount();
|
self::$DI['app']['authentication']->closeAccount();
|
||||||
|
self::$DI['app']->addFlash($type, $message);
|
||||||
|
|
||||||
$crawler = self::$DI['client']->request('GET', '/login/');
|
$crawler = self::$DI['client']->request('GET', '/login/');
|
||||||
|
|
||||||
@@ -342,9 +342,9 @@ class LoginTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
|||||||
*/
|
*/
|
||||||
public function testRenewPasswordPageShowsFlashMessages($type, $message)
|
public function testRenewPasswordPageShowsFlashMessages($type, $message)
|
||||||
{
|
{
|
||||||
|
self::$DI['app']['authentication']->closeAccount();
|
||||||
self::$DI['app']->addFlash($type, $message);
|
self::$DI['app']->addFlash($type, $message);
|
||||||
|
|
||||||
self::$DI['app']['authentication']->closeAccount();
|
|
||||||
$token = self::$DI['app']['tokens']->getUrlToken(\random::TYPE_PASSWORD, self::$DI['user']->get_id());
|
$token = self::$DI['app']['tokens']->getUrlToken(\random::TYPE_PASSWORD, self::$DI['user']->get_id());
|
||||||
|
|
||||||
$crawler = self::$DI['client']->request('GET', '/login/renew-password/', array(
|
$crawler = self::$DI['client']->request('GET', '/login/renew-password/', array(
|
||||||
|
Reference in New Issue
Block a user