Feature #22381 ยป 0001-Force-password-reset-for-default-admin-user.patch
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 |