Make WordPress Core


Ignore:
Timestamp:
07/18/2005 07:55:24 PM (19 years ago)
Author:
matt
Message:

Let advanced users override cookies.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable-functions.php

    r2711 r2725  
    192192    }
    193193
    194     setcookie('wordpressuser_'. $cookiehash, $username, time() + 31536000, $cookiepath);
    195     setcookie('wordpresspass_'. $cookiehash, $password, time() + 31536000, $cookiepath);
     194    setcookie(USER_COOKIE, $username, time() + 31536000, $cookiepath, COOKIE_DOMAIN);
     195    setcookie(PASS_COOKIE, $password, time() + 31536000, $cookiepath, COOKIE_DOMAIN);
    196196
    197197    if ( $cookiepath != $sitecookiepath ) {
    198         setcookie('wordpressuser_'. $cookiehash, $username, time() + 31536000, $sitecookiepath);
    199         setcookie('wordpresspass_'. $cookiehash, $password, time() + 31536000, $sitecookiepath);
     198        setcookie(USER_COOKIE, $username, time() + 31536000, $sitecookiepath, COOKIE_DOMAIN);
     199        setcookie(PASS_COOKIE, $password, time() + 31536000, $sitecookiepath, COOKIE_DOMAIN);
    200200    }
    201201}
     
    204204if ( !function_exists('wp_clearcookie') ) :
    205205function wp_clearcookie() {
    206     setcookie('wordpressuser_' . COOKIEHASH, ' ', time() - 31536000, COOKIEPATH);
    207     setcookie('wordpresspass_' . COOKIEHASH, ' ', time() - 31536000, COOKIEPATH);
    208     setcookie('wordpressuser_' . COOKIEHASH, ' ', time() - 31536000, SITECOOKIEPATH);
    209     setcookie('wordpresspass_' . COOKIEHASH, ' ', time() - 31536000, SITECOOKIEPATH);
     206    setcookie(USER_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
     207    setcookie(PASS_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
     208    setcookie(USER_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
     209    setcookie(PASS_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
    210210}
    211211endif;
Note: See TracChangeset for help on using the changeset viewer.