Add a method to clear an existing session for a given user.
This commit is contained in:
@@ -252,6 +252,14 @@ public class DepotUserRepository extends DepotRepository
|
||||
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
|
||||
* specified number of days.
|
||||
|
||||
Reference in New Issue
Block a user