Add a method to clear an existing session for a given user.

This commit is contained in:
Nathan Curtis
2012-01-18 13:37:34 -08:00
parent 7e20cb898d
commit 81a1927dca
@@ -252,6 +252,14 @@ public class DepotUserRepository extends DepotRepository
insert(sess); insert(sess);
} }
/**
* Clears the given user's existing session, if found.
*/
public void clearSession (int userId)
{
from(SessionRecord._R).where(SessionRecord.USER_ID, userId).delete();
}
/** /**
* Validates that the supplied session key is still valid and if so, refreshes it for the * Validates that the supplied session key is still valid and if so, refreshes it for the
* specified number of days. * specified number of days.