code clean
This commit is contained in:
+8
-2
@@ -13,12 +13,18 @@ use Battles\User;
|
||||
use Battles\UserInfo;
|
||||
|
||||
require_once 'config.php';
|
||||
|
||||
if (empty($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
} else {
|
||||
$user = new User($_SESSION['uid']);
|
||||
User::$current = new User($_SESSION['uid']);
|
||||
if (empty($user) && $_SESSION['uid']) {
|
||||
$user = new User($_SESSION['uid']);
|
||||
}
|
||||
|
||||
if (empty(User::$current) && $_SESSION['uid']) {
|
||||
User::$current = new User($_SESSION['uid']);
|
||||
}
|
||||
}
|
||||
if (User::$current->getId() && User::$current->getBlock()) {
|
||||
exit('user blocked!');
|
||||
|
||||
Reference in New Issue
Block a user