From 6918ec39ffd6b176107ee716ad772cb18d06a0c5 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 31 Jul 2013 22:30:08 +0200 Subject: [PATCH] Fixed registering through Google Plus --- .../files/lib/form/RegisterForm.class.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/wcfsetup/install/files/lib/form/RegisterForm.class.php b/wcfsetup/install/files/lib/form/RegisterForm.class.php index 3a7eb411f9..3ac4af4c1a 100644 --- a/wcfsetup/install/files/lib/form/RegisterForm.class.php +++ b/wcfsetup/install/files/lib/form/RegisterForm.class.php @@ -366,15 +366,17 @@ class RegisterForm extends UserAddForm { $registerVia3rdParty = true; } - switch ($googleData['gender']) { - case 'male': - $saveOptions[User::getUserOptionID('gender')] = UserProfile::GENDER_MALE; - break; - case 'female': - $saveOptions[User::getUserOptionID('gender')] = UserProfile::GENDER_FEMALE; - break; + if (isset($googleData['gender'])) { + switch ($googleData['gender']) { + case 'male': + $saveOptions[User::getUserOptionID('gender')] = UserProfile::GENDER_MALE; + break; + case 'female': + $saveOptions[User::getUserOptionID('gender')] = UserProfile::GENDER_FEMALE; + break; + } } - if (isset($facebookData['birthday'])) $saveOptions[User::getUserOptionID('birthday')] = $googleData['birthday']; + if (isset($googleData['birthday'])) $saveOptions[User::getUserOptionID('birthday')] = $googleData['birthday']; } // create fake password -- 2.20.1