當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UserController::logout方法代碼示例

本文整理匯總了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;
    }
}
開發者ID:codegooglecom,項目名稱:seopanel,代碼行數:31,代碼來源:login.php

示例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;
開發者ID:ka05,項目名稱:Webinator-New,代碼行數:31,代碼來源:dispatch.php

示例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();
開發者ID:sasumaki,項目名稱:Tsoha-Bootstrap,代碼行數:31,代碼來源:routes.php

示例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();
        }
開發者ID:asancheza,項目名稱:box,代碼行數:31,代碼來源:index.php

示例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");
開發者ID:nicoschenk,項目名稱:eshop_campsch,代碼行數:31,代碼來源:index.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();
開發者ID:ptyxis,項目名稱:ptyxis,代碼行數:31,代碼來源:index.php

示例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();
     }
 }
開發者ID:ahmedhosnycs,項目名稱:simpleframework,代碼行數:11,代碼來源:UserController.php

示例8:

<?php

if (UserController::logout() === true) {
    echo "ok";
    exit;
} else {
    echo "badLogout";
    exit;
}
echo "error";
exit;
開發者ID:fantasticmrdavid,項目名稱:hospo,代碼行數:11,代碼來源:logout.php


注:本文中的UserController::logout方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。