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


PHP UserController::createUser方法代碼示例

本文整理匯總了PHP中UserController::createUser方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserController::createUser方法的具體用法?PHP UserController::createUser怎麽用?PHP UserController::createUser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在UserController的用法示例。


在下文中一共展示了UserController::createUser方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: process

 function process()
 {
     if ($this->_input->post("Login")) {
         $userName = $this->_input->post('user_name');
         $passwd = md5($this->_input->post('passwd'));
         $this->_template->set_var("user_name", $userName);
         $checkArray = array('user_name' => 'Username', 'passwd' => 'Password');
         if ($this->_jScript->checkFilds($checkArray)) {
             $userCtrl = new UserController();
             $userEnt = $userCtrl->loginUser($userName, $passwd);
             if (is_object($userEnt)) {
                 $userObj = $userCtrl->createUser($userEnt);
                 $_SESSION['REGI_userObject'] = serialize($userObj);
                 $sessionObj = unserialize($_SESSION['REGI_userObject']);
                 if (is_object($sessionObj)) {
                     if ($sessionObj->getActive() == 0) {
                         $this->redirect('UserActivate');
                     } else {
                         $this->redirect('Radio');
                     }
                 }
             } else {
                 $this->_jScript->alert("Ingevoerde gebruikersnaam en/of wachtwoord is/zijn niet correct!");
             }
         }
     }
     $this->_template->parse($this->_outputName, $this->_mainBlock);
 }
開發者ID:srookhuizen,項目名稱:nedernesia,代碼行數:28,代碼來源:Login.php

示例2: UserController

 * Rather than including all my application code and logic
 * here i moved my functions to separate php classes and routed
 * to them using the switch() statement in this file
 */
// verifies that the action post variable is set and then choses
// which function to fire based on the POST['action'] value
if (isset($_POST['action'])) {
    // instantiate classes to call functions from
    $UserController = new UserController();
    $ProjectController = new ProjectController();
    $PageController = new PageController();
    // handle which function to call
    switch ($_POST['action']) {
        // User Methods
        case "createUser":
            $UserController->createUser();
            break;
        case "deleteUser":
            $UserController->deleteUser();
            break;
        case "getUser":
            $UserController->getUser();
            break;
        case "checkLoggedIn":
            $UserController->checkLoggedIn();
            break;
        case "isAdmin":
            $UserController->isAdmin();
            break;
        case "login":
            $UserController->login();
開發者ID:ka05,項目名稱:Webinator-New,代碼行數:31,代碼來源:dispatch.php

示例3: checkAdminLoggedIn

    checkAdminLoggedIn();
}
include_once SP_CTRLPATH . "/user.ctrl.php";
include_once SP_CTRLPATH . "/website.ctrl.php";
include_once SP_CTRLPATH . "/keyword.ctrl.php";
$controller = new UserController();
$controller->view->menu = 'users';
$controller->layout = 'ajax';
$controller->spTextPanel = $controller->getLanguageTexts('panel', $_SESSION['lang_code']);
$controller->set('spTextPanel', $controller->spTextPanel);
$controller->spTextUser = $controller->getLanguageTexts('user', $_SESSION['lang_code']);
$controller->set('spTextUser', $controller->spTextUser);
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    switch ($_POST['sec']) {
        case "create":
            $controller->createUser($_POST);
            break;
        case "update":
            $controller->updateUser($_POST);
            break;
        case "updatemyprofile":
            $controller->updateMyProfile($_POST);
            break;
        case "activateall":
            if (!empty($_POST['ids'])) {
                foreach ($_POST['ids'] as $id) {
                    $controller->__changeStatus($id, 1);
                }
            }
            $controller->listUsers($_POST);
            break;
開發者ID:codegooglecom,項目名稱:seopanel,代碼行數:31,代碼來源:users.php

示例4: UserController

<?php

/**
 * Created by PhpStorm.
 * User: Francois
 * Date: 30/04/15
 * Time: 15:05
 */
include_once '../controller/ImageController.php';
include_once '../controller/UserController.php';
$user = new UserController();
$image = new ImageController();
$lines = file('../dataset/pseudoDataset.txt');
$stack_pseudo = array();
foreach ($lines as $line_num => $line) {
    array_push($stack_pseudo, $line);
}
$lines = file('../dataset/imageDataset.txt');
$stack_image = array();
foreach ($lines as $line_num => $line) {
    array_push($stack_image, $line);
    /*
    $get = substr($line, 0, strlen($line) - 1);
    $imageString = file_get_contents($get);
    $save = file_put_contents('../dataset/image_download/' . basename($get), $imageString);
    */
}
foreach ($stack_pseudo as $pseudo) {
    $user->createUser(substr($pseudo, 0, strlen($pseudo) - 1), 'testAccount');
}
開發者ID:Flasheur111,項目名稱:420px,代碼行數:30,代碼來源:bootstrap.php

示例5: UserController

<?php

include_once '../controller/UserController.php';
$reg = new UserController();
$error = "OK";
$user_created = false;
if (isset($_POST["login"]) && isset($_POST["pass"])) {
    $error = $reg->createUser($_POST["login"], $_POST["pass"]);
    if ($error == "OK") {
        $user_created = true;
    }
}
echo '<div id="login">
        <h1>Registration</h1>';
if (!$user_created && !isset($_SESSION["user"])) {
    echo '<form name="registration" method="post" action="layout.php?selected=register">
          <input type="text" placeholder="Login" name="login"/>
          <input type="password" placeholder="Password" name="pass"/>';
    if ($error != "OK") {
        echo '<div class="alert alert-danger" role="alert">
              <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
              <span class="sr-only">Error:</span>' . $error . '</div>';
    }
    echo '
        <input type="submit" value="Register"/>
    </form>';
} else {
    echo '<div class="alert alert-success" role="alert"> <b>Registration success !</b></br> Welcome ' . $_SESSION["user"] . '</div>';
}
echo '</div>';
開發者ID:Flasheur111,項目名稱:420px,代碼行數:30,代碼來源:Register.php


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