home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Documentation / snippets / isauthenticated.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  986 b   |  38 lines

  1. <!---  This view-only example calls the IsAuthenticated
  2.        function. --->
  3.  
  4. <HTML>
  5. <HEAD>
  6. <TITLE>IsAuthenticated Function</TITLE>
  7. </HEAD>
  8.  
  9. <BODY>
  10. <H3>IsAuthenticated Function</H3>
  11. <P>The IsAuthenticated function indicates whether a
  12. user has been authenticated.
  13. <P>You typically code this tag in the Application.cfm file. 
  14. <P>This is a view-only example. Refer to the commented
  15. source code for more information.
  16. <!--- This code is from an Application.cfm file --->
  17. <!---
  18. <CFIF NOT IsAuthenticated()>
  19.   <CFTRY>
  20.   <CFAUTHENTICATE SECURITYCONTEXT="Allaire" USERNAME=#FORM.user#
  21.     PASSWORD=#FORM.pwd#>
  22.   <CFCATCH TYPE="Security">
  23.   <H3>Authentication error</H3>
  24.     <CFOUTPUT> --->
  25.     <!--- Display the message. Alternatively, you might place
  26.       code here to define the user to the security domain. --->
  27. <!---
  28.     <P>#CFCATCH.message#
  29.     </CFOUTPUT>
  30.   </CFCATCH>
  31.   </CFTRY>
  32. </CFIF>
  33. <CFAPPLICATION NAME="Personnel">
  34. --->
  35.  
  36. </BODY>
  37. </HTML>      
  38.