diff options
author | Go MAEDA <maeda@farend.jp> | 2024-07-19 08:26:13 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2024-07-19 08:26:13 +0000 |
commit | 0247ebb394233fd45ff7c68c9bc7ecb9533f9a7b (patch) | |
tree | c0e66a4cfaa50156546c8f9fc014daf519b1e8a0 | |
parent | 8a6a7e4edf9b7f6d969fef25786f876d80c7e84d (diff) | |
download | redmine-0247ebb394233fd45ff7c68c9bc7ecb9533f9a7b.tar.gz redmine-0247ebb394233fd45ff7c68c9bc7ecb9533f9a7b.zip |
Set default age parameter for User.prune method to 30 days (#41023).
git-svn-id: https://svn.redmine.org/redmine/trunk@22938 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/models/user.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 2fae4a7ca..ee1303d41 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -887,7 +887,7 @@ class User < Principal project_ids.map(&:to_i) end - def self.prune(age) + def self.prune(age=30.days) User.where("created_on < ? AND status = ?", Time.now - age, STATUS_REGISTERED).destroy_all end |