Project

General

Profile

Feature #22381 ยป 0001-Force-password-reset-for-default-admin-user.patch

Gregor Schmidt, 2016-04-04 11:13

View differences:

db/migrate/20160404080304_force_password_reset_during_setup.rb
1
class ForcePasswordResetDuringSetup < ActiveRecord::Migration
2
  def up
3
    User.where(login: "admin", last_login_on: nil).update_all(must_change_passwd: true)
4
  end
5

  
6
  def down
7
    User.where(login: "admin", last_login_on: nil, must_change_passwd: true).update_all(must_change_passwd: false)
8
  end
9
end
    (1-1/1)