• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Cookies deletion is not working

New Here ,
Jul 10, 2006 Jul 10, 2006

Copy link to clipboard

Copied

I use a cookie to save the password of a user so that the login goes automatically, without the needing the user to put in the password. but when a user changes his password the system is still taking the old pass word from the cookie. I tried to delete the Cookie usin the following piece of code with no success.

<cfcookie name="Pass" value="0" expires="now">
<cfcookie name="Username" value="0" expires="now">

Can you tell me what am i doing wrong
Many thanks
TOPICS
Advanced techniques

Views

422

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 10, 2006 Jul 10, 2006

Copy link to clipboard

Copied

What version of CF are you using? Can you post the code for the entire page that is doing the delete?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 10, 2006 Jul 10, 2006

Copy link to clipboard

Copied

i am using coldfusion MX 6.1

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 10, 2006 Jul 10, 2006

Copy link to clipboard

Copied

Can you post the code?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 10, 2006 Jul 10, 2006

Copy link to clipboard

Copied

i am using coldfusion MX 6.1

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 10, 2006 Jul 10, 2006

Copy link to clipboard

Copied

Can you post all of your ColdFusion (CFML) code that you are using to try to delete the cookies?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 10, 2006 Jul 10, 2006

Copy link to clipboard

Copied

LATEST
<cfcase value="update">
<cfif isDefined("name") and isDefined("username") and isdefined("email")>
<!--- Benutzername schon vergeben ? --->
<cfquery name="RSuserX" datasource="#A_DSN#">
SELECT lfdNr FROM Benutzerdaten
WHERE Benutzername = '#username#'
AND lfdNr <> #S_id#
</cfquery>
<cfif RSuserX.recordCount is 0>
<!--- gültiger Benutzername --->
<!--- altes Paßwort --->
<cfquery name="RSuserX" datasource="#A_DSN#">
SELECT Passwort FROM Benutzerdaten
WHERE lfdNr = #S_id#
</cfquery>
<cfset pw = false>
<!--- überprüfen,ob altes Paßwort richtig ? --->
<cfif not passwordOld is ''>
<cfoutput query="RSuserX">
<cfmodule template="usertags/crypt.cfm" password="#Passwort#" key="#passwordOld#" mode="decrypt">
<!---<cfif decrypt(Passwort,passwordOld) is passwordOld>--->
<cfif cryptPw is passwordOld>
<cfset pw = true>
<cfelse>
<cfset mess="Das angegebene alte Passwort ist ungueltig!">
<cflocation addtoken="no" url="update.cfm?id=#id#&message=#mess#">
</cfif>
</cfoutput>
</cfif>
<!--- Benutzerdaten ändern --->
<cfif pw>
<cfmodule template="usertags/crypt.cfm" password="#password#">
<cfquery name="RSuser" datasource="#A_DSN#">
UPDATE Benutzerdaten
SET Benutzername='#username#',
Name = '#name#',
Vorname = '#vorname#',
email = '#email#',
Passwort = '#cryptPw#'

WHERE lfdNr = #S_id#
</cfquery>
</cfif>
<cfset session.admin = username>
<cfset session.name = vorname & " " & name>
<!--- <cfset Session.update ="true"> --->
<cfcookie name="Pass" value="0" expires="now">
<cfcookie name="Username" value="0" expires="now">

<cfset mess="Benutzerdaten erfolgreich geaendert!">
<script language="JavaScript" type="text/javascript">
alert ('<cfoutput>#mess#</cfoutput>');
</script>
<cflocation addtoken="no" url="update.cfm?id=#id#">
<cfelse>
<cfset mess="Benutzername existiert bereits!">
<cflocation addtoken="no" url="update.cfm?id=#id#&message=#mess#">
</cfif>
</cfif>
</cfcase>
<cfcase value="remove">
</cfcase>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation