Attempt to log in when deleted updates lastlogin field

Bug #850580 reported by Richard Mansfield
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Confirmed
Low
Unassigned

Bug Description

When a deleted user attempts to log in, the lastlogin field is updated, but it shouldn't be.

Changed in mahara:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Robert Lyon (robertl-9) wrote :

This does not look to be happening for a deleted user anymore. It does, however, happen for a suspended user.

The problem is the ./htdocs/auth/user.php has an authenticate() function that saves the new 'lastlogin' value and it is called before the check to see if one is suspended. If we swap this around it should sort the problem.

But then comes the question: Do we want the database to reflect the last legitimate login or the last time they tried to to login?

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

I would say the last login was when they could actually get into their account and do something there, i.e. the legitimate login. Suspended users aren't able to log in and thus their login attempt should not count.

Robert Lyon (robertl-9)
Changed in mahara:
milestone: none → 1.9.0
Revision history for this message
Aaron Wells (u-aaronw) wrote :

Agreed, the main uses for lastlogin are auditing user activity, and showing to the user a "Welcome back, you last logged in on ___" message. For both those purposes, the last successful login is what's needed.

Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.9.0 → 1.9.1
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 1.9.1 → 1.9.2
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 1.9.2 → 1.9.3
Changed in mahara:
milestone: 1.9.3 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.