Welcome Guest!
 Mach-II CF
 Previous Message All Messages Next Message 
Newbie trying to figure out CFRETURN  web.de-@yahoo.com
 Nov 22, 2006 13:19 PST 

Hi all -

I'm brand new to Mach-ii, been handed the keys to a site already built
in it. I'm trying to add a password retrieval function and running into
problems. I have a cffunction in the application listener that queries
my user database to see if the email entered exists.

<cffunction name="CheckPassword" returntype="void" output="false" >
<cfargument name="event" type="MachII.framework.Event" required="yes"
displayname="Event" />

<cfquery name="CheckPassword" datasource="#variables.dsn#" >
SELECT password
FROM users
WHERE email = '#email#'
</cfquery>
<cfif CheckPassword.recordcount EQ 0>
<cfset hasAccount = 'You don't have an account'>
<cfelseif CheckPassword.recordcount GTE 2>
<cfset hasAccount = 'You have too many accounts'>
<cfelse>
<cfset hasAccount = 'here is your password: #CheckPassword.password#'>
</cfif>
</cffunction>


I've stripped this down to get to the point, but you get my gist. Can I
just add a CFRETURN to the bottom, right above the close of the function
tag?

<cfreturn hasAccount />

And if so, how do I actually call the result of this function after the
user has submitted so they can see their password (or lack thereof)?

Thanks for your time!

dR
	
 Previous Message All Messages Next Message 
  Check It Out!

  Topica Channels
 Best of Topica
 Art & Design
 Books, Movies & TV
 Developers
 Food & Drink
 Health & Fitness
 Internet
 Music
 News & Information
 Personal Finance
 Personal Technology
 Small Business
 Software
 Sports
 Travel & Leisure
 Women & Family

  Start Your Own List!
Email lists are great for debating issues or publishing your views.
Start a List Today!

© 2001 Topica Inc. TFMB
Concerned about privacy? Topica is TrustE certified.
See our Privacy Policy.