Skip to content

Commit

Permalink
Merge branch 'master' of github.com:hybridauth/hybridauth
Browse files Browse the repository at this point in the history
  • Loading branch information
AdwinTrave committed Sep 7, 2015
2 parents 972005a + f792cba commit e261094
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions additional-providers/hybridauth-draugiem/Providers/Draugiem.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -98,7 +98,14 @@ function getUserProfile()
throw new Exception( 'User profile request failed! ' . $this->providerId . ' api returned an invalid response.', 6 ); throw new Exception( 'User profile request failed! ' . $this->providerId . ' api returned an invalid response.', 6 );
} }


list($year, $month, $day) =explode("-",@$response['birthday']); $year = $month = $day = null;

if (isset($response['birthday'])) {
$birthday = explode("-", $response['birthday']);
if (count($birthday) === 3) {
list($year, $month, $day) = $birthday;
}
}


$this->user->profile->identifier = @ $response['uid']; $this->user->profile->identifier = @ $response['uid'];
$this->user->profile->displayName = $response['name']. ' ' .$response['surname']; $this->user->profile->displayName = $response['name']. ' ' .$response['surname'];
Expand All @@ -116,7 +123,6 @@ function getUserProfile()
case 'M': $this->user->profile->gender = 'male'; break; case 'M': $this->user->profile->gender = 'male'; break;
case 'F': $this->user->profile->gender = 'female'; break; case 'F': $this->user->profile->gender = 'female'; break;
} }

return $this->user->profile; return $this->user->profile;
} }


Expand Down

0 comments on commit e261094

Please sign in to comment.