当前位置: 首页>>代码示例>>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;未经允许,请勿转载。