Exemple #1
0
 protected function setUser(array $userData, &$user = null)
 {
     $user = new \samson\social\User();
     $user->birthday = isset($userData['response'][0]['bdate']) ? $userData['response'][0]['bdate'] : '';
     $user->gender = isset($userData['response'][0]['sex']) ? $userData['response'][0]['sex'] : '';
     $user->name = $userData['response'][0]['first_name'];
     $user->surname = $userData['response'][0]['last_name'];
     $user->socialID = $userData['response'][0]['uid'];
     $user->photo = $userData['response'][0]['photo'];
     parent::setUser($userData, $user);
 }
 protected function setUser(array $userData, &$user = null)
 {
     $user = new \samson\social\User();
     $user->birthday = $userData['birthday'];
     $user->gender = $userData['gender'];
     $user->locale = $userData['locale'];
     $user->name = $userData['first_name'];
     $user->surname = $userData['last_name'];
     $user->socialID = $userData['uid'];
     $user->photo = $this->baseURL . $userData['uid'] . '/picture';
     parent::setUser($userData, $user);
 }
Exemple #3
0
 protected function setUser(array $userData, &$user = null)
 {
     $user = new \samson\social\User();
     $user->birthday = isset($userData['birthday']) ? $userData['birthday'] : 0;
     $user->email = $userData['email'];
     $user->gender = $userData['gender'];
     $user->locale = $userData['locale'];
     $user->name = $userData['given_name'];
     $user->surname = $userData['family_name'];
     $user->socialID = $userData['id'];
     $user->photo = $userData['picture'];
     parent::setUser($userData, $user);
 }
Exemple #4
0
 protected function setUser(array $userData, &$user = null)
 {
     $user = new User();
     // Separate name and second name
     $name = explode(' ', $userData['name']);
     $user->birthday = isset($userData['birthday']) ? $userData['birthday'] : 0;
     $user->locale = $userData['lang'];
     $user->name = isset($name[0]) ? $name[0] : $name;
     $user->surname = isset($name[1]) ? $name[1] : '';
     $user->socialID = $userData['id'];
     $user->photo = $userData['profile_image_url'];
     parent::setUser($userData, $user);
 }