Question about when a form is open

I try to block users if their time on my application is longer than 1 hour. In my database, I created a view that ckeck it but I want to bounce users to come inside my form. Here my thinking.

IF logOK = “Ok” then

you can see the form

Else

redirect to url

End IF

Can someone help me ?

Subject: question about when a form is open

Are your users authenticated?How are you going to know when they arrived at your site? Cookies?

Are you planning on doing this test OnLoad?

There are possibilities. I don’t recognize what logOK represents.