v2.2.1 - Family accounts can log reading for family members prior to program start


An issue was found by @kit that a head-of-the-family account can log minutes for family members even if the program has not yet started (or is “not yet open”).

I believe this code snippet will fix the problem:

Edit the Controls/SimpleLoggingFamilyControl.aspx file. You should see a <ContentTemplate> tag on line 6. After that line, insert the following text:

    try {
        if(Session["Patron"] == null) {
        var patron = (GRA.SRP.DAL.Patron)Session["Patron"];
        var program = GRA.SRP.DAL.Programs.FetchObject(patron.ProgID);
        if(program == null || !program.IsOpen) {
    } catch(Exception ex) {

This should try to gracefully redirect the user to the top page of the site if the program is not yet open. It should be able to be left in for the duration of the program but if people are seeing any weirdness trying to log family reading it can be taken out.

This will be resolved in the next version (v2.3).


Thanks, Harald! I’ll send it on to our IT department and see how it goes.


It worked - thanks for your help!


Glad to help! :smile: