Commit f3a29a3d authored by Mark Caglienzi's avatar Mark Caglienzi
Browse files

Copy/paste fail... sorry. refs #9972

parent 6c5d0488
......@@ -82,9 +82,9 @@ class UserListJSON(OctonetMixin, View):
for u in users[start:start+length]:
# refs #9972
# Sometimes this get() will return None (as seen in test instances), so...
shadowMax = int(self.user.get('shadowMax', 0) or 0)
shadowMax = int(u.get('shadowMax', 0) or 0)
# This get didn't fail in test instances, but just to be on the safe side...
shadowLastChange = int(self.user.get('shadowLastChange', 0) or 0)
shadowLastChange = int(u.get('shadowLastChange', 0) or 0)
last_password_change = epoch + datetime.timedelta(days=shadowLastChange)
next_password_change = last_password_change + datetime.timedelta(days=shadowMax)
expired_password = shadowLastChange == 0 or next_password_change < today
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment