diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-07-23 20:44:07 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-07-23 20:44:07 +0400 |
commit | c29857ac00572485e47c9ad0a3740f7f2a0f89b6 (patch) | |
tree | 3178a567e94542a90dadef24fd4cc3d149682083 /app/controllers/admin/users_controller.rb | |
parent | 945dd627fed6b492367262b4aae661bc80e044ba (diff) | |
parent | c0a95947bcc3b2321f28ecfe72519c69e5c81e74 (diff) |
Merge branch 'new_user_password_set' into 'master'
Admin created user should get password reset link instead of mailed temporary password
Fixes #1405
See merge request !973
Diffstat (limited to 'app/controllers/admin/users_controller.rb')
-rw-r--r-- | app/controllers/admin/users_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index 0443e8b89ef..f63df27eebd 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -39,12 +39,13 @@ class Admin::UsersController < Admin::ApplicationController def create opts = { force_random_password: true, - password_expires_at: Time.now + password_expires_at: nil } @user = User.new(user_params.merge(opts)) @user.created_by_id = current_user.id @user.generate_password + @user.generate_reset_token @user.skip_confirmation! respond_to do |format| |