summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatt <matt@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-07-18 20:12:58 +0000
committermatt <matt@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-07-18 20:12:58 +0000
commit56a6c3ffd89be6cf7f482983b80e34fb8f38346b (patch)
treecb64b6cd79c8aa02864a8b72280a45f33c16a300
parent987d9d09b813bf26661ea0735f2c9d4ec5cedd23 (diff)
More cookie catchups
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@43 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-inst/wp-includes/functions.php2
-rw-r--r--wp-inst/wp-includes/pluggable-functions.php10
-rw-r--r--wp-inst/wp-login.php8
3 files changed, 10 insertions, 10 deletions
diff --git a/wp-inst/wp-includes/functions.php b/wp-inst/wp-includes/functions.php
index 2d5a788..682e63d 100644
--- a/wp-inst/wp-includes/functions.php
+++ b/wp-inst/wp-includes/functions.php
@@ -11,7 +11,7 @@ if (!function_exists('_')) {
function get_profile($field, $user = false) {
global $wpdb;
if (!$user)
- $user = $wpdb->escape($_COOKIE['wordpressuser_' . COOKIEHASH]);
+ $user = $wpdb->escape($_COOKIE[USER_COOKIE]);
return $wpdb->get_var("SELECT $field FROM $wpdb->users WHERE user_login = '$user'");
}
diff --git a/wp-inst/wp-includes/pluggable-functions.php b/wp-inst/wp-includes/pluggable-functions.php
index b76b263..c5cfa96 100644
--- a/wp-inst/wp-includes/pluggable-functions.php
+++ b/wp-inst/wp-includes/pluggable-functions.php
@@ -8,10 +8,10 @@ if ( !function_exists('get_currentuserinfo') ) :
function get_currentuserinfo() {
global $user_login, $userdata, $user_level, $user_ID, $user_email, $user_url, $user_pass_md5, $user_identity, $current_user;
- if ( !isset($_COOKIE['wordpressuser_' . COOKIEHASH]))
+ if ( !isset($_COOKIE[USER_COOKIE]))
return false;
- $user_login = $_COOKIE['wordpressuser_' . COOKIEHASH];
+ $user_login = $_COOKIE[USER_COOKIE];
$userdata = get_userdatabylogin($user_login);
$user_level = $userdata->user_level;
$user_ID = $userdata->ID;
@@ -149,9 +149,9 @@ endif;
if ( !function_exists('auth_redirect') ) :
function auth_redirect() {
// Checks if a user is logged in, if not redirects them to the login page
- if ( (!empty($_COOKIE['wordpressuser_' . COOKIEHASH]) &&
- !wp_login($_COOKIE['wordpressuser_' . COOKIEHASH], $_COOKIE['wordpresspass_' . COOKIEHASH], true)) ||
- (empty($_COOKIE['wordpressuser_' . COOKIEHASH])) ) {
+ if ( (!empty($_COOKIE[USER_COOKIE]) &&
+ !wp_login($_COOKIE[USER_COOKIE], $_COOKIE[PASS_COOKIE], true)) ||
+ (empty($_COOKIE[USER_COOKIE])) ) {
nocache_headers();
header('Location: ' . get_settings('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']));
diff --git a/wp-inst/wp-login.php b/wp-inst/wp-login.php
index f854521..5c4451a 100644
--- a/wp-inst/wp-login.php
+++ b/wp-inst/wp-login.php
@@ -165,10 +165,10 @@ default:
$user_pass = $_POST['pwd'];
$redirect_to = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $_POST['redirect_to']);
} elseif ( !empty($_COOKIE) ) {
- if (! empty($_COOKIE['wordpressuser_' . COOKIEHASH]) )
- $user_login = $_COOKIE['wordpressuser_' . COOKIEHASH];
- if (! empty($_COOKIE['wordpresspass_' . COOKIEHASH]) ) {
- $user_pass = $_COOKIE['wordpresspass_' . COOKIEHASH];
+ if (! empty($_COOKIE[USER_COOKIE]) )
+ $user_login = $_COOKIE[USER_COOKIE];
+ if (! empty($_COOKIE[PASS_COOKIE]) ) {
+ $user_pass = $_COOKIE[PASS_COOKIE];
$using_cookie = true;
}
}