summary refs log tree commit diff
path: root/synapse/config/registration.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/config/registration.py')
-rw-r--r--synapse/config/registration.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/synapse/config/registration.py b/synapse/config/registration.py

index 770b921aff..5898f0788c 100644 --- a/synapse/config/registration.py +++ b/synapse/config/registration.py
@@ -13,24 +13,22 @@ # See the License for the specific language governing permissions and # limitations under the License. -from distutils.util import strtobool - from synapse.api.constants import RoomCreationPreset from synapse.config._base import Config, ConfigError from synapse.types import RoomAlias, UserID -from synapse.util.stringutils import random_string_with_symbols +from synapse.util.stringutils import random_string_with_symbols, strtobool class RegistrationConfig(Config): section = "registration" def read_config(self, config, **kwargs): - self.enable_registration = bool( - strtobool(str(config.get("enable_registration", False))) + self.enable_registration = strtobool( + str(config.get("enable_registration", False)) ) if "disable_registration" in config: - self.enable_registration = not bool( - strtobool(str(config["disable_registration"])) + self.enable_registration = not strtobool( + str(config["disable_registration"]) ) self.registrations_require_3pid = config.get("registrations_require_3pid", [])