Skip to content

Commit d9c60bb

Browse files
committed
Fixed: Facebook settings were copied to the local database regardless of which options were chosen on the registration form.
Thanks to the anonymous user who reported this.
1 parent 24cc0e4 commit d9c60bb

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Facebook/FacebookUser.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -441,22 +441,18 @@ function createUser($username, $domain = '') {
441441
*/
442442

443443
// Store which fields should be auto-updated from Facebook when the user logs in.
444+
global $wgRequest;
444445
$updateFormPrefix = 'wpUpdateUserInfo';
445446
foreach (self::$availableUserUpdateOptions as $option) {
446-
/*
447447
if ($wgRequest->getVal($updateFormPrefix . $option, '') != '') {
448448
$user->setOption("facebook-update-on-login-$option", 1);
449449
} else {
450450
$user->setOption("facebook-update-on-login-$option", 0);
451451
}
452-
*/
453-
// Default all values to true. TODO: Remove this line, defaults are
454-
// taken care of by $wgDefaultUserOptions in FacebookInit
455-
$this->user->setOption("facebook-update-on-login-$option", 1);
456452
}
457453

458454
// Process the FacebookPushEvent preference checkboxes if Push Events are enabled
459-
global $wgFbEnablePushToFacebook, $wgRequest;
455+
global $wgFbEnablePushToFacebook;
460456
if( !empty( $wgFbEnablePushToFacebook ) ) {
461457
global $wgFbPushEventClasses;
462458
if ( !empty( $wgFbPushEventClasses ) ) {

0 commit comments

Comments
 (0)