Skip to content

Commit

Permalink
Try to override
Browse files Browse the repository at this point in the history
  • Loading branch information
luuhoangnam committed Mar 18, 2015
1 parent 14aa05d commit 962f8d5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,19 @@ public function getFetchAccountsFields()
];
}

/**
* @param \StdClass $data
*/
public function hydratePictureField($data)
{
$avatar = $data->data->url;

$this->saved(function () use ($avatar) {

$this->avatar = $avatar;
$this->save();

$this->unsetEvent('saved');
});
}
}

0 comments on commit 962f8d5

Please sign in to comment.