diff --git a/b2-include/b2functions.php b/b2-include/b2functions.php
index 32c29d7eee..ee2048b910 100644
--- a/b2-include/b2functions.php
+++ b/b2-include/b2functions.php
@@ -20,7 +20,7 @@ if (!function_exists('_')) {
function get_currentuserinfo() { // a bit like get_userdata(), on steroids
global $HTTP_COOKIE_VARS,$user_login,$userdata,$user_level,$user_ID,$user_nickname,$user_email,$user_url,$user_pass_md5;
// *** retrieving user's data from cookies and db - no spoofing
- $user_login = $HTTP_COOKIE_VARS["cafeloguser"];
+ $user_login = $HTTP_COOKIE_VARS["wordpressuser"];
$userdata = get_userdatabylogin($user_login);
$user_level = $userdata["user_level"];
$user_ID=$userdata['ID'];
diff --git a/b2-include/b2verifauth.php b/b2-include/b2verifauth.php
index a9b30ccc9b..34d0237986 100644
--- a/b2-include/b2verifauth.php
+++ b/b2-include/b2verifauth.php
@@ -11,9 +11,9 @@ function veriflog() {
global $HTTP_COOKIE_VARS;
global $tableusers,$tablesettings,$tablecategories,$tableposts,$tablecomments;
- if (!empty($HTTP_COOKIE_VARS["cafeloguser"])) {
- $user_login = $HTTP_COOKIE_VARS["cafeloguser"];
- $user_pass_md5 = $HTTP_COOKIE_VARS["cafelogpass"];
+ if (!empty($HTTP_COOKIE_VARS["wordpressuser"])) {
+ $user_login = $HTTP_COOKIE_VARS["wordpressuser"];
+ $user_pass_md5 = $HTTP_COOKIE_VARS["wordpresspass"];
} else {
return false;
}
@@ -45,7 +45,7 @@ function veriflog() {
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
- if (!empty($HTTP_COOKIE_VARS["cafeloguser"])) {
+ if (!empty($HTTP_COOKIE_VARS["wordpressuser"])) {
$error="Error: wrong login or password";
}
include("b2login.php");
diff --git a/b2login.php b/b2login.php
index 2191754409..8b77a67455 100644
--- a/b2login.php
+++ b/b2login.php
@@ -49,8 +49,8 @@ switch($action) {
case "logout":
- setcookie("cafeloguser");
- setcookie("cafelogpass");
+ setcookie("wordpressuser");
+ setcookie("wordpresspass");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate"); // for HTTP/1.1
@@ -130,14 +130,14 @@ case "login":
} else {
$user_login=$log;
$user_pass=$pwd;
- setcookie("cafeloguser",$user_login,time()+31536000);
+ setcookie("wordpressuser",$user_login,time()+31536000);
if ($pass_is_md5) {
- setcookie("cafelogpass",$user_pass,time()+31536000);
+ setcookie("wordpresspass",$user_pass,time()+31536000);
} else {
- setcookie("cafelogpass",md5($user_pass),time()+31536000);
+ setcookie("wordpresspass",md5($user_pass),time()+31536000);
}
- if (empty($HTTP_COOKIE_VARS["cafelogblogid"])) {
- setcookie("cafelogblogid","1",time()+31536000);
+ if (empty($HTTP_COOKIE_VARS["wordpressblogid"])) {
+ setcookie("wordpressblogid","1",time()+31536000);
}
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
@@ -254,9 +254,9 @@ break;
default:
- if((!empty($HTTP_COOKIE_VARS["cafeloguser"])) && (!empty($HTTP_COOKIE_VARS["cafelogpass"]))) {
- $user_login = $HTTP_COOKIE_VARS["cafeloguser"];
- $user_pass_md5 = $HTTP_COOKIE_VARS["cafelogpass"];
+ if((!empty($HTTP_COOKIE_VARS["wordpressuser"])) && (!empty($HTTP_COOKIE_VARS["wordpresspass"]))) {
+ $user_login = $HTTP_COOKIE_VARS["wordpressuser"];
+ $user_pass_md5 = $HTTP_COOKIE_VARS["wordpresspass"];
}
function checklogin() {
@@ -273,7 +273,7 @@ default:
}
if ( !(checklogin()) ) {
- if (!empty($HTTP_COOKIE_VARS["cafeloguser"])) {
+ if (!empty($HTTP_COOKIE_VARS["wordpressuser"])) {
$error="Error: wrong login/password"; //, or your session has expired.";
}
} else {
diff --git a/wp-admin/b2profile.php b/wp-admin/b2profile.php
index 40cd9d74ad..52f58c13df 100644
--- a/wp-admin/b2profile.php
+++ b/wp-admin/b2profile.php
@@ -81,7 +81,7 @@ case "update":
die ("ERROR: you typed two different passwords. Go back to correct that.");
$newuser_pass = $HTTP_POST_VARS["pass1"];
$updatepassword = "user_pass='$newuser_pass', ";
- setcookie("cafelogpass",md5($newuser_pass),time()+31536000);
+ setcookie("wordpresspass",md5($newuser_pass),time()+31536000);
}
$newuser_firstname=addslashes($HTTP_POST_VARS["newuser_firstname"]);
@@ -120,7 +120,7 @@ case "viewprofile":
get_currentuserinfo();
*/ $profiledata=get_userdata($user);
- if ($HTTP_COOKIE_VARS["cafeloguser"] == $profiledata["user_login"])
+ if ($HTTP_COOKIE_VARS["wordpressuser"] == $profiledata["user_login"])
header ("Location: b2profile.php");
$profile=1; /**/