save facebook id to db
This commit is contained in:
@@ -26,6 +26,9 @@ class User extends BaseUser
|
|||||||
*/
|
*/
|
||||||
private $facebookId;
|
private $facebookId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(name="facebook_access_token", type="string", length=255, nullable=true)
|
||||||
|
*/
|
||||||
private $facebookAccessToken;
|
private $facebookAccessToken;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ class MyFOSUBUserProvider extends BaseFOSUBProvider
|
|||||||
}
|
}
|
||||||
|
|
||||||
$user->setFacebookId($response->getUsername());
|
$user->setFacebookId($response->getUsername());
|
||||||
|
$user->setFacebookAccessToken($response->getAccessToken());
|
||||||
$user->setEmail($response->getEmail());
|
$user->setEmail($response->getEmail());
|
||||||
$user->setEmailCanonical($response->getEmail());
|
$user->setEmailCanonical($response->getEmail());
|
||||||
$user->setUsername($this->slug($response->getRealName()));
|
$user->setUsername($this->slug($response->getRealName()));
|
||||||
|
|||||||
@@ -443,4 +443,52 @@ class PlayedGame
|
|||||||
{
|
{
|
||||||
return $this->resign;
|
return $this->resign;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set created
|
||||||
|
*
|
||||||
|
* @param \DateTime $created
|
||||||
|
*
|
||||||
|
* @return PlayedGame
|
||||||
|
*/
|
||||||
|
public function setCreated($created)
|
||||||
|
{
|
||||||
|
$this->created = $created;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get created
|
||||||
|
*
|
||||||
|
* @return \DateTime
|
||||||
|
*/
|
||||||
|
public function getCreated()
|
||||||
|
{
|
||||||
|
return $this->created;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set updated
|
||||||
|
*
|
||||||
|
* @param \DateTime $updated
|
||||||
|
*
|
||||||
|
* @return PlayedGame
|
||||||
|
*/
|
||||||
|
public function setUpdated($updated)
|
||||||
|
{
|
||||||
|
$this->updated = $updated;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get updated
|
||||||
|
*
|
||||||
|
* @return \DateTime
|
||||||
|
*/
|
||||||
|
public function getUpdated()
|
||||||
|
{
|
||||||
|
return $this->updated;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,4 +162,28 @@ class Step
|
|||||||
{
|
{
|
||||||
return $this->wBomb;
|
return $this->wBomb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set created
|
||||||
|
*
|
||||||
|
* @param \DateTime $created
|
||||||
|
*
|
||||||
|
* @return Step
|
||||||
|
*/
|
||||||
|
public function setCreated($created)
|
||||||
|
{
|
||||||
|
$this->created = $created;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get created
|
||||||
|
*
|
||||||
|
* @return \DateTime
|
||||||
|
*/
|
||||||
|
public function getCreated()
|
||||||
|
{
|
||||||
|
return $this->created;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user