|
Re: Newbie trying to figure out CFRETURN
|
web.de-@yahoo.com
|
Nov 22, 2006 14:08 PST
|
Thanks Peter...
----- Original Message ----
From: Peter J. Farrell <pj-@maestropublishing.com>
To: mach-ii-c-@topica.com
Sent: Wednesday, November 22, 2006 3:49:50 PM
Subject: Re: Newbie trying to figure out CFRETURN
dR-
See message below. We'll be happy to help you at our new Google Groups...
---------------------------------------------
Based on the survey results (we'll share the rest of the results
soon), there was an overwhelming preference to move the Mach-II
mailing list from Topica to Google Groups. The new group has been set
up and while we don't have plans to actually delete the Topica group
for quite some time (if ever, since the archives might be handy),
please move all future mailing list traffic to the new Google Group
immediately.
http://groups.google.com/group/mach-ii-for-coldfusion
Please let us know if anyone has any problems subscribing.
This is the first step in improving the Mach-II project
infrastructure. We're starting on the mach-ii.com web site as well
(among several other efforts), so if you have any suggestions about
the web site feel free to share.
Here's to a new improved Mach-II over the coming months!
web.de-@yahoo.com said the following on 11/22/2006 3:19 PM:
| | 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
|
--
Peter J. Farrell - Maestro Publishing
http://blog.maestropublishing.com
--
Co-Host of the ColdFusion Weekly Podcast
http://www.coldfusionweekly.com
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
|
|
 |
|