Ticket #5471 (closed Bug: fixed)

Opened 10 years ago

Last modified 7 years ago

last_login_time incorrect?

Reported by: jan.murre@… Owned by: plonista
Priority: minor Milestone: 2.5.1
Component: General Version:
Keywords: last_login_time Cc:

Description (last modified by wichert) (diff)

In CMFPLone.MembershipTool.MembershipTool.setLoginTimes() there is:

    def setLoginTimes(self):
        """ Called by logged_in to set the login time properties
            even if members lack the "Set own properties" permission.
        if not self.isAnonymousUser():
            member = self.getAuthenticatedMember()
            login_time = member.getProperty('login_time', '2000/01/01')
            if  str(login_time) == '2000/01/01':
                login_time = self.ZopeTime()

So last_login_time is set to the current time. After you have logged in, this property is useless to get the content that has been updated after the previous login.

I think it should be:


Change History

comment:1 Changed 10 years ago by wichert

  • Description modified (diff)

comment:2 Changed 10 years ago by wichert

  • Status changed from new to closed
  • Resolution set to fixed

(In [10258]) Fix handling of login_time and last_login member properties. fixes #5471

comment:3 Changed 10 years ago by hannosch

  • Milestone changed from 2.5.x to 2.5.1

comment:4 Changed 10 years ago by hannosch

(In [10784]) Adjusted test for initial log-in time to new behaviour introduced in rev10258. Refs #5471.

comment:5 Changed 7 years ago by hannosch

  • Component changed from Login and registration to Infrastructure

comment:6 Changed 4 years ago by davisagli

  • Component changed from Infrastructure to General
Note: See TracTickets for help on using tickets.