Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Add Comment
Please, Sign In to add comment