Strange Error...
Hey there
[RPC Fault faultString="Unable to invoke CFC - Local variable currentUserVO on line 26 must be grouped at the top of the function body." faultCode="Server.Processing" faultDetail=""]
<cffunction name="login" displayname="login" access="remote" output="false" >
<cfargument name="userVO" required="true" type="CurrentUserVO">
<cfquery name="loginQuery" datasource="*">
SELECT * FROM user WHERE username= '#userVO.username#' AND password = '#userVO.password#'
</cfquery>
<cfloop query="loginQuery">
<cfset var currentUserVO=createObject("component","CurrentUserVO")>
<cfset currentUserVO.username = #loginQuery.username# >
<cfset currentUserVO.password = #loginQuery.password# >
<cfset currentUserVO.firstname = #loginQuery.firstname# >
<cfset currentUserVO.lastname = #loginQuery.lastname# >
<cfset currentUserVO.id = #loginQuery.id# >
<cfset currentUserVO.mail = #loginQuery.mail# >
<cfset currentUserVO.tel = #loginQuery.tel# >
</cfloop>
<cfif isDefined("currentUserVO")>
<cfreturn #currentUserVO#>
<cfelse>
<cfreturn 'false'>
</cfif>
</cffunction>
In the past( on my local mashine) it works correctly. But i'll test it on a real server and that error occours.... Is the Script not correct? (I'm a FlashDeveloper and to sooo familiar with Coldfusion)
Greetings, Nico
