<cfset UserID=Session.UserID & "@">
<cfquery>
  select *
  from table
  where email like '#UserID#%'
</cfquery>

Ray Thompson
Tau Beta Pi (www.tbp.org) 
The Engineering Honor Society 
865-546-4578

-----Original Message-----
From: Adam Parker [mailto:[email protected]] 
Sent: March 20, 2009 11:39 AM
To: sql
Subject: Re: Get Username from email address


>The query you wrote does it.
>
>However, id the user is logging in with a username, isn't that
>username going to be in the DB somewhere? How is the authentication
>checked? What happens if two people have email addresses like
>[email protected] and [email protected]?
>
>mxAjax / CFAjax docs and other useful articles:
>http://www.bifrost.com.au/blog/
>>

The users are verified and checked by a CAS server.  Once the username has
been verified, the user is redirected to the secured application.  The
session variable contains only the username.  The database contains email
addresses.  I am not certain how to approach this using CF.  I thought that
something could be done to compare the username to the characters to the
left of the "@" in the email address.  I'm just not clear on the "how" part.

Thank you. 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3206
Subscription: http://www.houseoffusion.com/groups/sql/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.6

Reply via email to