本文整理汇总了PHP中UserController::logout方法的典型用法代码示例。如果您正苦于以下问题:PHP UserController::logout方法的具体用法?PHP UserController::logout怎么用?PHP UserController::logout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserController
的用法示例。
在下文中一共展示了UserController::logout方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: switch
$controller->view->menu = 'login';
$controller->set('spTitle', 'Seo Panel: Login section');
$controller->set('spDescription', 'Login to Seo Panel and utilise seo tools and plugins to increase the perfomance of your site.');
$controller->set('spKeywords', 'Seo Panel Login section');
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
switch ($_POST['sec']) {
case "login":
$controller->login();
break;
case "requestpass":
$controller->set('spTitle', 'Seo panel forgot password');
$controller->requestPassword($_POST['email']);
break;
default:
$controller->index();
break;
}
} else {
switch ($_GET['sec']) {
case "logout":
$controller->logout();
break;
case "forgot":
$controller->set('spTitle', 'Seo Panel forgot password');
$controller->forgotPasswordForm();
break;
default:
$controller->index($_GET);
break;
}
}
示例2:
$UserController->deleteUser();
break;
case "getUser":
$UserController->getUser();
break;
case "checkLoggedIn":
$UserController->checkLoggedIn();
break;
case "isAdmin":
$UserController->isAdmin();
break;
case "login":
$UserController->login();
break;
case "logout":
$UserController->logout();
break;
// Project Methods
// Project Methods
case "createProject":
$ProjectController->createProject();
break;
case "deleteProject":
$ProjectController->deleteProject();
break;
case "getProject":
$ProjectController->getProject();
break;
case "getProjects":
$ProjectController->getProjects();
break;
示例3: function
$routes->get('/hero/:id/edit', function ($id) {
HeroController::edit($id);
});
$routes->post('/hero/:id/edit', function ($id) {
HeroController::update($id);
});
$routes->get('/login', function () {
// Kirjautumislomakkeen esittäminen
UserController::login();
});
$routes->post('/login', function () {
// Kirjautumisen käsittely
UserController::handle_login();
});
$routes->post('/logout', function () {
UserController::logout();
});
$routes->post('/hero/:id/destroy', function ($id) {
HeroController::destroy($id);
});
$routes->get('/drafts', function () {
DraftController::index();
});
$routes->get('/drafts/new', function () {
DraftController::create();
});
$routes->get('/drafts/:id', function ($id) {
DraftController::show($id);
});
$routes->post('/drafts', function () {
DraftController::store();
示例4: UserController
$url = filter_var($_GET['url'], FILTER_SANITIZE_STRING);
}
/*
* Check URL to send request to the right controller
*/
switch ($url) {
case "login":
include_once "controllers/UserController.php";
$user = new UserController();
$user->login();
$user->showLogin();
break;
case "logout":
include_once "controllers/UserController.php";
$user = new UserController();
$user->logout();
break;
case "register":
include_once "controllers/UserController.php";
$user = new UserController();
$user->register();
break;
case "user":
include_once "controllers/UserController.php";
$user = new UserController();
if ($_GET["action"] == "update") {
$user->update();
}
if ($_GET["action"] == "delete") {
$user->delete();
}
示例5: header
}
break;
//Send
//Send
case 'Send':
//prüft ob die Customer Daten erfolgreich gespeichert wurden
if ($cust_controller->registerCustomer()) {
header("Location:./view/LoginView.php");
} else {
header("Location:./view/RegisterView.php?err=13");
}
break;
//logout
//logout
case 'logout':
$user_controller->logout();
header("Location:view/LoginView.php");
break;
// admin operations
// admin operations
case 'show-Userlist':
header("Location:view/UserListView.php");
break;
case 'show-Customers':
header("Location:view/CustomerListView.php");
break;
case 'show-Orders':
header("Location:view/OrderView.php");
break;
case 'Back':
header("Location:view/AdminView.php");
示例6: function
$app->render($data['layout'] . '.php', $data);
});
$app->get('/user/login', function () use($app) {
$userController = new UserController();
$data = $userController->login();
$app->render($data['layout'] . '.php', $data);
});
// POST route
$app->post('/user/login', function () use($app) {
$userController = new UserController();
$data = $userController->login();
$app->render($data['layout'] . '.php', $data);
});
$app->get('/user/logout', function () use($app) {
$userController = new UserController();
$data = $userController->logout();
});
$app->get('/user/profile', function () use($app) {
$userController = new UserController();
$data = $userController->profile();
$app->render($data['layout'] . '.php', $data);
});
// POST route
$app->post('/user/profile', function () use($app) {
$userController = new UserController();
$data = $userController->profile();
$app->render($data['layout'] . '.php', $data);
});
// POST route
$app->post('/user/changepassword', function () use($app) {
$userController = new UserController();
示例7: profile
static function profile($args = null)
{
if (isset($_SESSION['user_login']) && time() - $_SESSION['user_login'] > 60) {
UserController::logout();
}
if (isset($_SESSION['user_id']) && $_SESSION['user_id']) {
return View::Show('msg', ["name" => $_SESSION['user_name']]);
} else {
UserController::logout();
}
}
示例8:
<?php
if (UserController::logout() === true) {
echo "ok";
exit;
} else {
echo "badLogout";
exit;
}
echo "error";
exit;