// save data and redirect to registration
else {
WCF::getSession()->register('__username', $userData['name']);
- WCF::getSession()->register('__email', $userData['email']);
+ if (isset($userData['email'])) WCF::getSession()->register('__email', $userData['email']);
WCF::getSession()->register('__facebookData', $userData);
// we assume that bots won't register on facebook first
WCF::getSession()->unregister('__facebookData');
- if ($facebookData['email'] == $this->email) {
+ if (isset($facebookData['email']) && $facebookData['email'] == $this->email) {
$registerVia3rdParty = true;
}
- $saveOptions[User::getUserOptionID('gender')] = ($facebookData['gender'] == 'male' ? UserProfile::GENDER_MALE : UserProfile::GENDER_FEMALE);
+ if (isset($facebookData['gender'])) $saveOptions[User::getUserOptionID('gender')] = ($facebookData['gender'] == 'male' ? UserProfile::GENDER_MALE : UserProfile::GENDER_FEMALE);
if (isset($facebookData['birthday'])) {
list($month, $day, $year) = explode('/', $facebookData['birthday']);