in my cfc the return type is boolean and is set to return true if there is a 
match. when i set the return type to query to return the query 
result(checkAuthentication), nothing happens.

<cffunction name="loginUser" access="remote" returntype="boolean">
                    <cfargument name="username" type="string" required="true"/>
                    <cfargument name="password" type="string" required="true"/>

                    <cfquery name="checkAuthentication" 
datasource="authentication">
                          SELECT *
                          FROM profile
                          where username = <cfqueryparam 
cfsqltype="cf_sql_varchar" value="#arguments.username#">
                                and Password = <cfqueryparam 
cfsqltype="cf_sql_varchar" value="#arguments.password#">
                    </cfquery>                  

                    <cfif checkAuthentication.recordCount EQ 1>
                           <cfreturn true/>
                           <!---<cfreturn checkAuthentication>--->
                    <cfelse>
                           <cfreturn false/>
                    </cfif>
           </cffunction>

Reply via email to