Inactive Account Handling

I need to build in functionality for the web to detect whether the account is inactive or not and to display a message if it is inactive. Has anyone built this in to their website and which methods did you use?

I have the following code below that a fellow Tessitura member provided me.

I'm unsure where in my C# page it needs to go. Any assistance would be greatly appreciated.

Tessitura.Tessitura soapService = new Tessitura.Tessitura(); // new up soap reference

DataSet ds = soapService.GetConstituentInfo(SessionKey);  //Pass logged in session key

bool inactive = bool.Parse(ds.Tables["ConstiuentHeader"].Rows[0]["inactive"].ToString());

Parents
  • Former Member
    Former Member $organization

    Hi Matthew!

    Not sure what the user experience should be with regards to this inactive login - but if you were not allowing customers to login with an inactive login, for example, then you might use the above code after your login call was executed, e.g.(pseudocode -- hopefully makes sense)

    Bool loggedIn = soapService.Login(SessionKey, Login, Password, LoginType)

    if (loggedIn) {

      ... your code snippet from above concerning detection of inactive accounts ...

       if (inactive) {

          DisplayInactiveLoginToUser();

       } else {

         RedirectUserToPostLoginLocation();

       }

    }

    Not sure if this is what you're after or not - let us know!

Reply
  • Former Member
    Former Member $organization

    Hi Matthew!

    Not sure what the user experience should be with regards to this inactive login - but if you were not allowing customers to login with an inactive login, for example, then you might use the above code after your login call was executed, e.g.(pseudocode -- hopefully makes sense)

    Bool loggedIn = soapService.Login(SessionKey, Login, Password, LoginType)

    if (loggedIn) {

      ... your code snippet from above concerning detection of inactive accounts ...

       if (inactive) {

          DisplayInactiveLoginToUser();

       } else {

         RedirectUserToPostLoginLocation();

       }

    }

    Not sure if this is what you're after or not - let us know!

Children
  • After looking through the code, turns out there was already a user object created. I extended this object to have a public method that has an inactive value and checks the contents of my inactive field to see if it is empty. Along with adding a trinary statement. I tested with an inactive account and it worked! Just need to figure out why inactive accounts can still access the site even if the inactive message prompt appears. I think it's a cookie issue. Thanks!