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 setFacebookName($facebookName) { $this->__initializer__ && $this->__initializer__->__invoke($this, 'setFacebookName', array($facebookName)); return parent::setFacebookName($facebookName); }