app/models/camaleon_cms/site.rb in camaleon_cms-2.0.4.1 vs app/models/camaleon_cms/site.rb in camaleon_cms-2.1.0

- old
+ new

@@ -112,10 +112,14 @@ # security: user register form show captcha? def security_user_register_captcha_enabled? get_option('security_captcha_user_register', false) == true end + def need_validate_email? + get_option('need_validate_email', false) == true + end + # auto create default user roles def set_default_user_roles(post_type = nil) user_role = self.user_roles.where({slug: 'admin', term_group: -1}).first_or_create({name: 'Administrator', description: 'Default roles admin'}) if user_role.valid? d, m = {}, {} @@ -232,9 +236,10 @@ def destroy_site unless PluginRoutes.system_info["users_share_sites"] CamaleonCms::User.where(site_id: self.id).destroy_all end FileUtils.rm_rf(upload_directory) # destroy current media directory + users.destroy_all unless PluginRoutes.system_info["users_share_sites"] # destroy all users assigned fot this site end # default structure for each new site def default_settings default_post_type = [