Some issues here.

First, you need to var scope ALL variables not passed in as arguments,
so you need to add

<cfset var verify_login = "">

Now, notice how if verify_login has a recordcount of 0, the session vars
won't set. Well, could that be the issue? Are you 100% sure you are
sending a valid uname/pword to the method?

========================================================================
===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email    : [EMAIL PROTECTED]
Blog     : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: Michael Dinowitz [mailto:[EMAIL PROTECTED] 
> Sent: Monday, August 11, 2003 11:44 AM
> To: CF-Talk
> Subject: Re: Sessions and CFCs
> 
> 
> Rather straight forward function to set the userid and 
> information based on login. I call it once per user.
> 
>  <CFFUNCTION NAME="Login" RETURNTYPE="boolean">
>   <CFARGUMENT NAME="Username" TYPE="string" REQUIRED="yes">
>   <CFARGUMENT NAME="Password" TYPE="string" REQUIRED="yes">
>   <cfquery name="verify_login" datasource="#This.DSN#">
>    SELECT user_id, nickname, name, password
>     FROM users
>     WHERE Username = #Username# AND
>      password = '#password#'
>   </cfquery>
>   <cfif verify_login.recordCount>
>    <cfset session.userid = verify_login.userid>
>    <cfset session.name = verify_login.name>
>    <CFreturn 1>
>   <CFELSE>
>    <CFreturn 0>
>   </cfif>
>  </CFFUNCTION>
> 
> 
> 
> > Micheal, can you show the login method? Also, is the code 
> that calls 
> > login being run every hit?
> >
> > 
> ======================================================================
> > ==
> > ===
> > Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
> > (www.mindseye.com)
> > Member of Team Macromedia 
> (http://www.macromedia.com/go/teammacromedia)
> >
> > Email    : [EMAIL PROTECTED]
> > Blog     : www.camdenfamily.com/morpheus/blog
> > Yahoo IM : morpheus
> >
> > "My ally is the Force, and a powerful ally it is." - Yoda
> >
> > > -----Original Message-----
> > > From: Michael Dinowitz [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, August 11, 2003 3:18 AM
> > > To: CF-Talk
> > > Subject: Re: Sessions and CFCs
> > >
> > >
> > > I've tested it out a few ways to Sunday and the results 
> are always 
> > > the same. As long as the CFC is cached, only the first 
> 'use' of the 
> > > CFC will result in any session information being written for the 
> > > user. Every additional attempt results in no session 
> being written. 
> > > This is the code.
> > > caching:
> > > <CFIF not IsDefined('Application.CFC.User')>
> > >  <cfparam name="Application.cfc" default="#structNew()#"> 
> <CFOBJECT 
> > > NAME="Application.CFC.User" COMPONENT="components.user">
> > >   <cfinvoke component ="#Application.CFC.User#" method = "Init">
> > >   <CFINVOKEARGUMENT NAME="dsn" VALUE="#DSN#">
> > >  </CFINVOKE>
> > > </CFIF>
> > > call:
> > >  <CFINVOKE COMPONENT="#Application.CFC.User#" METHOD="Login" 
> > > RETURNVARIABLE="IsLoggedIn">
> > >   <CFINVOKEARGUMENT NAME="Username" VALUE="#Username#">
> > >   <CFINVOKEARGUMENT NAME="Password" VALUE="#Password#"> 
> </CFINVOKE> 
> > > Is it possible that when I upgraded to 6.1 from the last beta 
> > > something went wrong? I'm seeing  6,1,0,60662 as the build.
> > >
> > > > On Sunday, Aug 10, 2003, at 21:43 US/Pacific, Michael
> > > Dinowitz wrote:
> > > > > Running full release of 6.1 on a machine that was running
> > > the beta.
> > > >
> > > > Hmm, weird. The page context bug is *definitely* fixed 
> in Red Sky, 
> > > > even in the beta versions!
> > > >
> > > > > What is this page context bug, where can I read more
> > > about it and is
> > > > > there a fix
> > > >
> > > > 
> http://www.google.com/search?q=page+context+bug&ie=UTF-8&oe=UT
F-8
> > >
> > > The fix should be CFMX 6.1!
> > >
> > > Since that *does* fix the bug, let's see your code... maybe
> > you've got
> > > a bug in your code?
> > >
> > > Sean A Corfield -- http://www.corfield.org/blog/
> > >
> > > "If you're not annoying somebody, you're not really alive."
> > > -- Margaret Atwood
> > >
> > >
> >
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to