|
@@ -51,7 +51,6 @@ ob_start(); //Start a buffer, mainly in case there is a mysql error
|
51
|
51
|
require(SERVER_ROOT.'/classes/debug.class.php'); //Require the debug class
|
52
|
52
|
require(SERVER_ROOT.'/classes/mysql.class.php'); //Require the database wrapper
|
53
|
53
|
require(SERVER_ROOT.'/classes/cache.class.php'); //Require the caching class
|
54
|
|
-require(SERVER_ROOT.'/classes/encrypt.class.php'); //Require the encryption class
|
55
|
54
|
require(SERVER_ROOT.'/classes/time.class.php'); //Require the time class
|
56
|
55
|
require(SERVER_ROOT.'/classes/paranoia.class.php'); //Require the paranoia check_paranoia function
|
57
|
56
|
require(SERVER_ROOT.'/classes/regex.php');
|
|
@@ -63,7 +62,6 @@ $Debug->set_flag('Debug constructed');
|
63
|
62
|
|
64
|
63
|
$DB = new DB_MYSQL;
|
65
|
64
|
$Cache = new CACHE(MEMCACHED_SERVERS);
|
66
|
|
-$Enc = new CRYPT;
|
67
|
65
|
|
68
|
66
|
// Autoload classes.
|
69
|
67
|
require(SERVER_ROOT.'/classes/classloader.php');
|
|
@@ -93,12 +91,9 @@ list($Classes, $ClassLevels) = Users::get_classes();
|
93
|
91
|
// Enabled - if the user's enabled or not
|
94
|
92
|
// Permissions
|
95
|
93
|
|
96
|
|
-if (isset($_COOKIE['session'])) {
|
97
|
|
- $LoginCookie = $Enc->decrypt($_COOKIE['session']);
|
98
|
|
-}
|
99
|
|
-if (isset($LoginCookie)) {
|
100
|
|
- list($SessionID, $LoggedUser['ID']) = explode('|~|', $Enc->decrypt($LoginCookie));
|
101
|
|
- $LoggedUser['ID'] = (int)$LoggedUser['ID'];
|
|
94
|
+if (isset($_COOKIE['session']) && isset($_COOKIE['userid'])) {
|
|
95
|
+ $SessionID = $_COOKIE['session'];
|
|
96
|
+ $LoggedUser['ID'] = (int)$_COOKIE['userid'];
|
102
|
97
|
|
103
|
98
|
$UserID = $LoggedUser['ID']; //TODO: UserID should not be LoggedUser
|
104
|
99
|
|
|
@@ -138,7 +133,6 @@ if (isset($LoginCookie)) {
|
138
|
133
|
$Cache->cache_value('enabled_'.$LoggedUser['ID'], $Enabled, 0);
|
139
|
134
|
}
|
140
|
135
|
if ($Enabled == 2) {
|
141
|
|
-
|
142
|
136
|
logout();
|
143
|
137
|
}
|
144
|
138
|
|