Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb
index 12e7707..8326310 100644
--- a/app/models/mail_handler.rb
+++ b/app/models/mail_handler.rb
@@ -339,8 +339,16 @@ class MailHandler < ActionMailer::Base
user.lastname = '-' if user.lastname.blank?
user.login = user.mail
- user.password = ActiveSupport::SecureRandom.hex(5)
+ password = ActiveSupport::SecureRandom.hex(5)
+ user.password = password
user.language = Setting.default_language
+ if user.save
+ Mailer.deliver_account_information(user, password)
+ return user
+ else
+ return nil
+ end
+
user.save ? user : nil
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.