386
CFML Language Reference
IsAuthenticated
Returns TRUE if the user has been authenticated for any ColdFusion security context.
If you specify the name of the security context, IsAuthenticated returns TRUE if the
user has been authenticated for the specified ColdFusion security context.
See also
CFAUTHENTICATE
,
AuthenticatedContext
,
AuthenticatedUser
, and
IsAuthorized
.
Syntax
IsAuthenticated
([
security-context-name ])
security-context-name
The security context name.
Example
<!--- This example calls the IsAuthenticated function. --->
<!--- This code is from an Application.cfm file --->
<CFIF NOT IsAuthenticated(“Allaire”)>
<CFTRY>
<CFAUTHENTICATE SECURITYCONTEXT="Allaire" USERNAME=#user#
PASSWORD=#pwd#>
<CFCATCH TYPE="Security">
<!--- the message to display --->
<H3>Authentication error</H3>
<CFOUTPUT>
<!--- Display the message. Alternatively, you might place
code here to define the user to the security context. --->
<P>#CFCATCH.message#
</CFOUTPUT>
</CFCATCH>
</CFTRY>
</CFIF>
<CFAPPLICATION NAME="Personnel">
</BODY>
</HTML>
Содержание COLDFUSION 4.5-CFML LANGUAGE
Страница 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Страница 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Страница 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Страница 296: ...272 CFMLLanguageReference INPUT TYPE text NAME number2 BR INPUT TYPE submit NAME submit VALUE Add FORM BODY HTML...
Страница 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Страница 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Страница 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Страница 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Страница 557: ...Chapter 2 ColdFusion Functions 533 P CFOUTPUT Value i is employee keysToStruct i CFOUTPUT P CFLOOP CFIF BODY HTML...
Страница 584: ...560 CFMLLanguageReference...
Страница 594: ...570 CFMLLanguageReference...