summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-23 16:44:07 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-23 16:44:07 +0000
commitc29857ac00572485e47c9ad0a3740f7f2a0f89b6 (patch)
tree3178a567e94542a90dadef24fd4cc3d149682083 /app/controllers
parent945dd627fed6b492367262b4aae661bc80e044ba (diff)
parentc0a95947bcc3b2321f28ecfe72519c69e5c81e74 (diff)
downloadgitlab-ce-c29857ac00572485e47c9ad0a3740f7f2a0f89b6.tar.gz
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')
-rw-r--r--app/controllers/admin/users_controller.rb3
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|