Commit ad169612 authored by root's avatar root
Browse files

Fix bug identity

parent 8d216e49
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -128,8 +128,12 @@ class Module implements ConsoleBannerProviderInterface, ConsoleUsageProviderInte

        $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 {