Commit 59df5e07 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Fix Conflit

parents 9cd3a401 ad169612
Loading
Loading
Loading
Loading
+5 −13
Original line number Diff line number Diff line
@@ -122,20 +122,12 @@ class Module implements ConsoleBannerProviderInterface, ConsoleUsageProviderInte
    public function onUserLogin( $e ){

        $dbUser = null;
        if( $e instanceof AdapterChainEvent ){

		if( is_string($e->getIdentity()) ){
			$dbUser = $this->getEntityManager()->getRepository(Authentification::class)->findOneBy(['username' => $e->getIdentity()]);
		} else {
			$dbUser = $this->getEntityManager()->getRepository(Authentification::class)->find($e->getIdentity());
		}
        }
        elseif ($e instanceof UserAuthenticatedEvent ) {
            $dbUser = $e->getDbUser();
        } else {
            die('OK ?');
            // meh !
        }


        try {
            $dbUser->setDateLogin(new \DateTime());