• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Problem mit Doctrine + ZF2 Authentication (Login)

nookie

I did it all for the nookie
Guten Abend,

folgendes Problem: Ich habe einen Login mit Doctrine und ZF2 realisiert. Funktioniert auch alles einwandfrei soweit bis auf das ich ein nicht vollständiges Objekt mitgeliefert bekomme.

PHP:
 private function getAuthentication($email, $password) {

        $password = $this->getPasswordHash($password);

        $auth = $this->getServiceLocator()->get('Zend\Authentication\AuthenticationService');

        $adapter = $auth->getAdapter();

        $adapter->setIdentityValue($email);
        $adapter->setCredentialValue($password);

        $result = $auth->authenticate($adapter);

        return $result;
    }


Bekomme nun aber folgende Rückgabe.
PHP:
object(Core\Entity\DbGaia\User)[484]
  private 'id' => int 3
  private 'salutation' => string 'Herr' (length=4)
  private 'firstname' => string 'Test' (length=7)
  private 'lastname' => string 'Test' (length=7)
  private 'email' => string '[email protected]' (length=27)
  private 'password' => string 'cc03e747a6afbbcbf8be7668acfebee5' (length=32)
  private 'created' =>
    object(DateTime)[482]
      public 'date' => string '2015-01-19 18:21:07.000000' (length=26)
      public 'timezone_type' => int 3
      public 'timezone' => string 'Europe/Berlin' (length=13)
  private 'active' => boolean true
  private 'deleted' => null
  private 'customer' =>
    object(DoctrineORMModule\Proxy\__CG__\Core\Entity\DbGaia\Customer)[531]
      public '__initializer__' =>
        object(Closure)[487]
      public '__cloner__' =>
        object(Closure)[488]
      public '__isInitialized__' => boolean false
      private 'id' (Core\Entity\DbGaia\Customer) => int 1
      private 'salutation' (Core\Entity\DbGaia\Customer) => null
      private 'firstname' (Core\Entity\DbGaia\Customer) => null
      private 'lastname' (Core\Entity\DbGaia\Customer) => null
      private 'company' (Core\Entity\DbGaia\Customer) => null
      private 'legalForm' (Core\Entity\DbGaia\Customer) => null
      private 'country' (Core\Entity\DbGaia\Customer) => null
      private 'city' (Core\Entity\DbGaia\Customer) => null
      private 'plz' (Core\Entity\DbGaia\Customer) => null
      private 'street' (Core\Entity\DbGaia\Customer) => null
      private 'housenumber' (Core\Entity\DbGaia\Customer) => null
      private 'housenumberAdditional' (Core\Entity\DbGaia\Customer) => null
      private 'fax' (Core\Entity\DbGaia\Customer) => null
      private 'mobile' (Core\Entity\DbGaia\Customer) => null
      private 'phone' (Core\Entity\DbGaia\Customer) => null
      private 'created' (Core\Entity\DbGaia\Customer) => string 'CURRENT_TIMESTAMP' (length=17)
      private 'active' (Core\Entity\DbGaia\Customer) => string '1' (length=1)
      private 'deleted' (Core\Entity\DbGaia\Customer) => null
      private 'contract' (Core\Entity\DbGaia\Customer) => null
      private 'inputFilter' (Core\Entity\DbGaia\Customer) => null
  private 'inputFilter' => null

Eigentlich sollte das Objekt voll befüllt sein, allerdings sind nur die id und active gesetzt. Habe schon öfters jetzt meine Entitys durchgeschaut aber komme irgendwie nicht vorran.
 
Keiner einen Ansatz oder eine Idee? Google hilft mir bisher auch nicht weiter oder ich benutze einfach die falschen Suchbegriffe..
 
Zurück
Oben