diff options
author | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-07 21:49:19 +0000 |
---|---|---|
committer | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-07 21:49:19 +0000 |
commit | 7682706a46a20e3e58a9afd8ba208d5b0c040499 (patch) | |
tree | c8cb5e3d75609aa2b8f52748626bde7ffa7a041b /engine/lib/upgrades | |
parent | ff31226fdeb972aac2f37f0098240cb366a9bb26 (diff) | |
download | elgg-7682706a46a20e3e58a9afd8ba208d5b0c040499.tar.gz elgg-7682706a46a20e3e58a9afd8ba208d5b0c040499.tar.bz2 |
Adding an option to restrict new user registration in advanced site settings.
This is the first step in fully merging "Walled Garden" plugin into core Elgg engine.
git-svn-id: http://code.elgg.org/elgg/trunk@5981 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/upgrades')
-rw-r--r-- | engine/lib/upgrades/2010050701.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engine/lib/upgrades/2010050701.php b/engine/lib/upgrades/2010050701.php new file mode 100644 index 000000000..33e4b5bae --- /dev/null +++ b/engine/lib/upgrades/2010050701.php @@ -0,0 +1,15 @@ +<?php +/** + * Removes the Walled Garden plugin in favor of new system settings + */ + +$access = elgg_set_ignore_access(TRUE); + +if (is_plugin_enabled('walledgarden')) { + disable_plugin('walledgarden'); + set_config('allow_registration', FALSE); +} else { + set_config('allow_registration', TRUE); +} + +elgg_set_ignore_access($access); |