Commit 4181f859 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Fixes that user's last_login_on was not set when using registration with automatic activation.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2594 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 175ac71b
......@@ -248,6 +248,7 @@ class AccountController < ApplicationController
def register_automatically(user, &block)
# Automatic activation
user.status = User::STATUS_ACTIVE
user.last_login_on = Time.now
if user.save
self.logged_user = user
flash[:notice] = l(:notice_account_activated)
......
......@@ -110,7 +110,10 @@ class AccountTest < ActionController::IntegrationTest
assert_response :success
assert_template 'my/account'
assert User.find_by_login('newuser').active?
user = User.find_by_login('newuser')
assert_not_nil user
assert user.active?
assert_not_nil user.last_login_on
end
def test_register_with_manual_activation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment