]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #2310. Only conditionally setting the allow_registration field for users who...
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 8 Mar 2011 05:44:02 +0000 (05:44 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 8 Mar 2011 05:44:02 +0000 (05:44 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8631 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/upgrades/2010050701.php

index e327abdde1e01fa7d80b062e357d35abd91af6a8..b92d6a6688ab0f7af9e593b25e5cfb67267906bf 100644 (file)
@@ -14,8 +14,11 @@ if (elgg_is_active_plugin('walledgarden')) {
        set_config('walled_garden', FALSE);
 }
 
+// this was for people who manually set the config option
 $disable_registration = elgg_get_config('disable_registration');
-$allow_registration = !$disable_registration;
-elgg_save_config('allow_registration', $allow_registration);
+if ($disable_registration !== null) {
+       $allow_registration = !$disable_registration;
+       elgg_save_config('allow_registration', $allow_registration);
+}
 
 elgg_set_ignore_access($access);