소스 검색

Merge remote-tracking branch 'localheinz/fix/undefined-class'

Jordi Boggiano 10 년 전
부모
커밋
4ef0c17d1f

+ 1 - 0
src/Packagist/WebBundle/Controller/UserController.php

@@ -12,6 +12,7 @@
 
 namespace Packagist\WebBundle\Controller;
 
+use Doctrine\ORM\NoResultException;
 use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;

+ 1 - 1
src/Packagist/WebBundle/Entity/Package.php

@@ -157,7 +157,7 @@ class Package
         }
         $maintainers = array();
         foreach ($this->getMaintainers() as $maintainer) {
-            /** @var $maintainer Maintainer */
+            /** @var $maintainer User */
             $maintainers[] = $maintainer->toArray();
         }
         $data = array(

+ 0 - 5
src/Packagist/WebBundle/Form/Handler/OAuthRegistrationFormHandler.php

@@ -16,7 +16,6 @@ use FOS\UserBundle\Model\UserManagerInterface;
 use FOS\UserBundle\Util\TokenGeneratorInterface;
 use HWI\Bundle\OAuthBundle\Form\RegistrationFormHandlerInterface;
 use HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface;
-use HWI\Bundle\OAuthBundle\OAuth\Response\AdvancedUserResponseInterface;
 use Symfony\Component\Form\Form;
 use Symfony\Component\HttpFoundation\Request;
 
@@ -52,10 +51,6 @@ class OAuthRegistrationFormHandler implements RegistrationFormHandlerInterface
         // Try to get some properties for the initial form when coming from github
         if ('GET' === $request->getMethod()) {
             $user->setUsername($this->getUniqueUsername($userInformation->getNickname()));
-
-            if ($userInformation instanceof AdvancedUserResponseInterface) {
-                $user->setEmail($userInformation->getEmail());
-            }
         }
 
         $form->setData($user);