Bugs in expiry/inactivity due to bad time formatting

Bug #907919 reported by Richard Mansfield
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Richard Mansfield

Bug Description

When reloading a user account's expiry date from the db into $USER, the time is not converted to the correct format, causing users to be unable to login even when their expiry date is in the future.

Also, the get_user function fails to convert db timestamps to unix timestamps for some fields. This will interfere with the update of the 'active' flag if we want to base inactivity on lastaccess and/or ctime as well as lastlogin.

Revision history for this message
François Marier (fmarier) wrote :
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/955
Committed: http://gitorious.org/mahara/mahara/commit/f7dcdf818b8e59337d0929d97547cc52fd582e7a
Submitter: Francois Marier (<email address hidden>)
Branch: master

commit f7dcdf818b8e59337d0929d97547cc52fd582e7a
Author: Richard Mansfield <email address hidden>
Date: Thu Dec 22 17:03:10 2011 +1300

    Convert expiry date when reloading user object (bug #907919)

    Commit 725ba9294039b82bec947be5301acf160f4744ae tries to reload
    certain admin-settable fields from the database into a LiveUser when
    committing, but fails to convert the expiry date to a timestamp when
    doing so. This causes logins to fail for users who have an expiry
    date set in the future.

    Change-Id: I53e962a0f5bab56ab130e1945b251f70447e9411
    Signed-off-by: Richard Mansfield <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/956
Committed: http://gitorious.org/mahara/mahara/commit/75c26d47575607ce1599e89793ec3d4276ea2e2d
Submitter: Francois Marier (<email address hidden>)
Branch: master

commit 75c26d47575607ce1599e89793ec3d4276ea2e2d
Author: Richard Mansfield <email address hidden>
Date: Thu Dec 22 17:03:57 2011 +1300

    Convert all time fields in get_user (bug #907919)

    The get_user function only converts two of the timestamp db columns
    into unix timestamps. None of the additional fields are used yet, but
    all should be converted the same way to avoid nasty surprises.

    Change-Id: Ie40797136c68ea7501aace3b0fa41f75bbba64f7
    Signed-off-by: Richard Mansfield <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
milestone: none → 1.5.0
Melissa Draper (melissa)
Changed in mahara:
status: Fix Committed → Fix Released
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.