##// END OF EJS Templates
Code cleanup (#19458)....
Jean-Philippe Lang -
r13883:c8fb0956d15b
parent child
Show More
@@ -323,13 +323,12 class User < Principal
323 323 return auth_source.allow_password_changes?
324 324 end
325 325
326 # Returns true if the user password has expired
326 327 def password_expired?
327 changed_on = self.passwd_changed_on || Time.at(0)
328 period = Setting.password_max_age.to_i
329
330 if period.zero?
328 if Setting.password_max_age.to_i.zero?
331 329 false
332 330 else
331 changed_on = self.passwd_changed_on || Time.at(0)
333 332 changed_on < period.days.ago
334 333 end
335 334 end
@@ -17,7 +17,7
17 17 <%= submit_tag l(:button_apply) %>
18 18 <% end %>
19 19
20 <% unless @user.must_change_passwd? || @user.password_expired? %>
20 <% unless @user.must_change_password? %>
21 21 <% content_for :sidebar do %>
22 22 <%= render :partial => 'sidebar' %>
23 23 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now