Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
AdonaiEchad #1
Logging someone out of a site after a certin time period
Can someone help me. I have created a login form and used Application.cfm to
hold my login and loginuser. I would like to know if anyone knows how to
logout a user if they are logged in the site for lets say more than 5 hours.
So they have to log back in after 5 hours or what ever the time is specified.
I am attaching my Application.cfm code of what I have currently. If any body
knows can you please tell me how to do this and where should I place this in my
code. Thank you very much everyone. Thank you, AdonaiEchad
--------------------------------------
<cflogin>
<cfif isDefined ('FORM.login_button.y')>
<cfquery datasource="#sLOMM#" name="qLogin">
SELECT users.user_id, users.name_first, user_type.type
FROM users, user_type
WHERE user_type.user_type_id = users.user_type_id
AND users.email = '#FORM.email#'
AND users.password = '#FORM.password#'
</cfquery>
<cfif qLogin.RecordCount GT 0>
<cfset session.name_first = #qlogin.name_first#/>
<cfloginuser name="#qLogin.user_id#" password="#FORM.password#"
roles="#qLogin.type#"/>
<cfelse>
<cfset sHeaderMessage = "The e-mail and password combination you tried is
incorrect." />
<cfinclude template="login_form.cfm" />
<cfabort />
</cfif>
<cfelse>
<cfinclude template="login_form.cfm" />
<cfabort />
</cfif>
</cflogin>
AdonaiEchad Guest
-
Allowing opening pdf for a period of time
Is there a way to create a pdf so that when provided to users, there is a time limit on opening it??? In other words, I have material that is... -
How can I avoid the mouse click during a short period of time???
Hello to all!!! I have a projector movie that opens another projector movie when a specific button is clicked. It works fine , but, if the... -
Way to automatically recycle aspnet_wp work process when close to 100% CPU for certain period of time?
I have a server setup that is dedicate to providing a "proxy" by exposing a web service that calls methods in a 3rd party ActiveX control and then... -
Changing a sprite member for a period of time
Dear Forum I have developed a childs numeracy and spelling game. I have managed to build the back-end of the system i.e the creation of random... -
Loop for a period of time.
Hello everyone. I am making a auto play slide show of about 50 images. How can i make director loop on a image for say 10 seconds before moving... -
AdonaiEchad #2
Re: Logging someone out of a site after a certin timeperiod
Does anyone know how to do this?
AdonaiEchad Guest
-
mpwoodward *TMM* #3
Re: Logging someone out of a site after a certin time period
AdonaiEchad wrote:
The user's session will time out after the amount of time specified in> Does anyone know how to do this?
the CF administrator. That doesn't really log them out per se, but they
do lose their session. In CFMX 7 there is a new onSessionEnd method
that is run when a session ends (as long as you're using the new
Application.cfc as opposed to Application.cfm) so you could leverage
that to handle a more graceful logout if you're on CF 7.
Matt
--
Matt Woodward
Team Macromedia - ColdFusion
mpwoodward *TMM* Guest
-
Defuse #4
Re: Logging someone out of a site after a certin timeperiod
Actually, there is an easy way to do what you're trying accomplish. A few years
back I wanted to do the same thing. Now, I can't remember exactly how to do it,
but it would require using http-refresh tags (remember those?) and CF's
CreateTimeSpan or something. You match the timespan with the refresh time,
which would be like 20 or 30 minutes (in seconds) and if the timespan was
greater than the refresh time, you would spit them out to a page that explained
that they were idle too long.
Sorry for the vagueness, I'll try to find the source of the one I did and post
it for you.
HTH
Defuse Guest



Reply With Quote

