[DS-1085] Apply patch (slightly updated) from Jira ticket

This commit is contained in:
Mark H. Wood
2012-08-15 11:55:39 -04:00
committed by Ivan Masár
parent a0714564b7
commit 0d948ae708
2 changed files with 45 additions and 5 deletions

View File

@@ -9,6 +9,7 @@ package org.dspace.eperson;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.commons.codec.DecoderException;
@@ -811,7 +812,7 @@ public class EPerson extends DSpaceObject
}
/**
* Can the user log in?
* Is the user self-registered?
*
* @return boolean, yes/no (or false if the column is an SQL NULL)
*/
@@ -954,6 +955,26 @@ public class EPerson extends DSpaceObject
return answer;
}
/**
* Stamp the EPerson's last-active date.
*
* @param when latest activity timestamp, or null to clear.
*/
public void setLastActive(Date when)
{
myRow.setColumn("last_active", when);
}
/**
* Get the EPerson's last-active stamp.
*
* @return date when last logged on, or null.
*/
public Date getLastActive()
{
return myRow.getDateColumn("last_active");
}
/**
* Update the EPerson
*/