Ok here is my situation!
Our companies web host does not allow for the use of cftry tag. I am new to cold fusion and have been given a password changing page that uses cftry blocks. I didn't create the page and is setup kinda funky whoever wrote this.
I need to find a way to do some exception handling for this change password stuff and not use the cftry tag. I will give as much code here as possible but some is proprietary.
<cftry>
<cfldap stuff...... server, uname, ou, o, password, attribute, action="Modify, dn>
<cfoutput> Password Changed</cfoutput>
<cfcatch type="any">
<cfif REFindNoCase("invalid credentials",#cfcatch.detail#) GT 0>
<cfoutput>old password invalid</cfoutput>
<cfelseif REF...("no such object",...>
<cfoutput> the ID you entered "# userID #", does not exist</cfoutput>
<cfelse>
<cfoutput>#cfcatch.detail#</cfoutput>
</cfif>
</cfcatch>
</cftry>
I cannot use the cftry and cfcatch tags but can use the cferror tag.
Any help would be wonderful.
Thanks
Our companies web host does not allow for the use of cftry tag. I am new to cold fusion and have been given a password changing page that uses cftry blocks. I didn't create the page and is setup kinda funky whoever wrote this.
I need to find a way to do some exception handling for this change password stuff and not use the cftry tag. I will give as much code here as possible but some is proprietary.
<cftry>
<cfldap stuff...... server, uname, ou, o, password, attribute, action="Modify, dn>
<cfoutput> Password Changed</cfoutput>
<cfcatch type="any">
<cfif REFindNoCase("invalid credentials",#cfcatch.detail#) GT 0>
<cfoutput>old password invalid</cfoutput>
<cfelseif REF...("no such object",...>
<cfoutput> the ID you entered "# userID #", does not exist</cfoutput>
<cfelse>
<cfoutput>#cfcatch.detail#</cfoutput>
</cfif>
</cfcatch>
</cftry>
I cannot use the cftry and cfcatch tags but can use the cferror tag.
Any help would be wonderful.
Thanks