Nich
unread,Nov 4, 2010, 9:01:28 AM11/4/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Object-Oriented Programming in ColdFusion
Hello folks,
Hoping that I could get help to prevent concurrent logins with the
same account.
I'm using the default Application.cfc login procedure.
Was thinking of setting the logged status to "1" for that user, when
the user logs in, then set it to "0" when the user logs out or when
the session expires.
When another person tries to login with the same details from
elsewhere, it blocks, because the logged status will be "1".
I've done all the above other than changing the status to "0" when the
session expires.
I put the code in onSessionEnd, but the code is not being executed.
<cffunction name="onSessionEnd" returnType="void">
<cfquery name="updateloggedstatus" datasource="datadsn">
UPDATE usermanagerlogin
SET
logged = '0'
WHERE userid = 'manager'>
</cfquery>
</cffunction>
On cf9, any Ideas?
Thank you,
Nich