This is a ColdFusion/mobile question. I have a simple web app with a login
page. User types their login info, session info is assigned, and they're taken
to a projects page. This works fine, but when I try to setup an auto-login
(user clicks a bookmark on their home screen that passes a username and
password), the same process should occur, but the session info is lost once
they are taken to the projects page. This occurs on the BlackBerry 9370 (w/
touch screen. not sure of the model type), but works fine when testing it in a
browser and the BlackBerry simulator. Here's some code for the auto login:
<cfquery name="qryAccount">
EXEC m_AccountLogin
@Username = <cfqueryparam value="#LCase(url.u)#"
cfsqltype="cf_sql_varchar">,
@Password = <cfqueryparam value="#LCase(url.p)#"
cfsqltype="cf_sql_varchar">;
</cfquery>
<cfif qryAccount.recordcount>
<cflock name="lockAccount" type="exclusive" timeout="10">
<cfset session.account = {
isLoggedIn = true,
MemberID = qryAccount.iMemberID,
Role = qryAccount.iRole }>
</cflock>
<cflocation url="/mobile/home/projects.cfm" addtoken="true">
<cfelse>
<cflocation url="/mobile/index.cfm" addtoken="true">
</cfif>
I read that using <cflocation> right after assigning session vars may cause an
issue, so I tried a JavaScript re-direct and still came up short. Any ideas?
Thanks in advance.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349750
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm