diff --git a/script/import-cooperation.net b/script/import-cooperation.net index 4891ca6..f492720 100755 --- a/script/import-cooperation.net +++ b/script/import-cooperation.net @@ -100,6 +100,7 @@ for username in ARGV # create user user = User.new(:login => login, :email => username, :environment => environment) + user.enable_email = true # import person data imported_data = Hash.from_xml(File.read(File.join(IMPORT_DIR, username + '.xml')))['person'] diff --git a/util/mail/postgresql/mail_users.sql b/util/mail/postgresql/mail_users.sql index 386d7f7..3cb5fd3 100644 --- a/util/mail/postgresql/mail_users.sql +++ b/util/mail/postgresql/mail_users.sql @@ -27,6 +27,7 @@ JOIN domains on ( ( profiles.preferred_domain_id is null and + domain.is_default and domains.owner_id = environments.id and domains.owner_type = 'Environment' ) -- libgit2 0.21.2