예제 #1
0
 private function onCreateNewUser($nameArray)
 {
     $user = new User();
     $user->setCreatedAt(new \DateTime());
     $user->setUsername($nameArray['nickname']);
     $user->setFacebookName($nameArray['realname']);
     $user->setEmail($nameArray['email']);
     $user->setPlainPassword($nameArray['email']);
     $user->setFacebookData($nameArray['avatar']);
     $user->setFacebookUid($nameArray['facebook_id']);
     $em = $this->doctrine->getManager();
     $em->persist($user);
     return $em->flush();
 }
 /**
  * {@inheritDoc}
  */
 public function setFacebookData($facebookData)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setFacebookData', array($facebookData));
     return parent::setFacebookData($facebookData);
 }