Patch #3858 » force_admin_password_change_20150927.diff
db/migrate/20150927013306_force_admin_to_change_password.rb (working copy) | ||
---|---|---|
1 |
class ForceAdminToChangePassword < ActiveRecord::Migration |
|
2 |
def change |
|
3 |
admin = User.find_by_login('admin') |
|
4 |
if admin && ! admin.last_login_on && ! admin.passwd_changed_on |
|
5 |
admin.update_columns(must_change_passwd: true) |
|
6 |
end |
|
7 |
end |
|
8 |
end |
- « Previous
- 1
- 2
- Next »