当前位置: 首页>>代码示例>>PHP>>正文


PHP UserManager::getUser方法代码示例

本文整理汇总了PHP中UserManager::getUser方法的典型用法代码示例。如果您正苦于以下问题:PHP UserManager::getUser方法的具体用法?PHP UserManager::getUser怎么用?PHP UserManager::getUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserManager的用法示例。


在下文中一共展示了UserManager::getUser方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: validateUser

 /**
  * validate if the username and password is correct
  * @param string username
  * @param string password
  * @return boolean true if validation is sucessful, false otherwise
  *
  */
 public function validateUser($username, $password)
 {
     $um = new UserManager();
     $um->setUser($username);
     $result = $um->getUser();
     $pass = hash('sha256', $result['salt'] . hash('sha256', $password));
     if ($result['userpassword'] == $pass) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:silotester,项目名称:silo,代码行数:19,代码来源:Autorisasi.php

示例2: getLosingBuyers

 public function getLosingBuyers($auctionId, $highestBidderId)
 {
     $connection = ConnectionManager::getConnection();
     $auctionId = (int) $auctionId;
     $highestBidderId = (int) $highestBidderId;
     $sql = "SELECT DISTINCT bidder_id FROM bid WHERE auction_id = {$auctionId} AND bidder_id <> {$highestBidderId}";
     $resultSet = $connection->query($sql);
     $losers = array();
     $userManager = new UserManager();
     while ($row = $resultSet->fetch_assoc()) {
         $losers[] = $userManager->getUser($row['bidder_id']);
     }
     return $losers;
 }
开发者ID:melindafekete,项目名称:AuctionSystem_COMPGC06,代码行数:14,代码来源:AuctionAwarderManager.php

示例3: UserManager

require_once '../common/php/Utils.php';
$document_root = Utils::getDocumentRoot();
require_once $document_root . '/common/php/UserManager.php';
require_once $document_root . '/common/php/ApplicationManager.php';
require_once $document_root . '/common/php/PageManager.php';
require_once $document_root . '/common/php/MenuManager.php';
Utils::startSession();
$user_mgr = new UserManager();
$is_login = $user_mgr->isLogin();
if (!$is_login) {
    //ログインページに遷移する
    header("Location: /login/login.php");
    exit;
}
$user = $user_mgr->getUser();
$page_mgr = new PageManager(PageManager::PAGE_PROSPECT);
$menu_mgr = new MenuManager();
$title = $page_mgr->getTitle();
$organ_id = $user['organ_id'];
$user_id = $user['user_id'];
$tag_options = array('mycss' => true, 'angularjs' => true, 'ngroute' => true, 'nganimate' => true, 'nggrid' => true, 'uirouter' => true, 'jquery1' => true, 'jqueryuilatest' => true, 'jquerydatepicker' => true, 'jquerydatetimepicker' => true, 'jquerymultiselect' => true, 'jquerycookie' => true, 'ngfileupload' => true, 'uplogiccommon' => true, 'list' => true, 'search' => true, 'import' => true, 'activity_history' => true, 'item_setting' => true, 'ngdialog' => true, 'exclusion_smart_admin' => true);
?>
<!DOCTYPE html>
<html lang="ja" ng-app="myApp">
<head>
  <?php 
echo $page_mgr->getHeader($tag_options);
?>
  <?php 
echo $page_mgr->getScriptTags($tag_options);
开发者ID:nakanokenichi,项目名称:Hello-World,代码行数:30,代码来源:prospect.php

示例4: Database

define('LANG', Translation::getLang());
define('LANGS', LIB . 'translations/');
require LANGS . 'GeneralT.php';
GeneralT::init();
// Classes
require LIB . 'base/InfoMessage.php';
require LIB . 'base/AdminInfoMessage.php';
require LIB . 'themes/scss/scss.inc.php';
// Auto-Loader
require LIB . 'common/ClassLoader.php';
// Connect to database
$db = new Database($DBCRED['host'], $DBCRED['username'], $DBCRED['password'], $DBCRED['database']);
// Unset $DBCRED for security reasons
unset($DBCRED);
$userManager = new UserManager();
$user = $userManager->getUser();
// Tokens
$token = new Token();
$token->_('user.php', 'GET', RANK_USER);
$token->_('viewforum.php', 'GET', RANK_USER);
$token->_('viewtopic.php', 'GET', RANK_USER);
if (isset($disableTokenHere) && is_array($disableTokenHere)) {
    foreach ($disableTokenHere as $ex) {
        $token->_($ex, 'GET, POST', RANK_USER);
        $token->_($ex, 'GET, POST', RANK_ADMIN);
    }
}
// Plugins
$activePlugins = array();
PluginHelper::loadActivePlugins();
PluginHelper::delegate('__onCreate', array($db, $user));
开发者ID:GIDIX,项目名称:quicktalk,代码行数:31,代码来源:base.php

示例5: AgendaManager

<?php

require_once "private/config.php";
require_once "views/GeneralView.class.php";
require_once "views/ErrorOrSuccessView.class.php";
require_once "models/Agenda.class.php";
require_once "models/AgendaManager.class.php";
require_once "models/User.class.php";
require_once "models/UserManager.class.php";
$agendaManager = new AgendaManager($db);
$userManager = new UserManager($db);
$viewG = new GeneralView();
$viewG->header("Suppression d'utilisateur");
$viewG->navBar("Suppression d'utilisateur");
if (isset($_SESSION['login'])) {
    $user = $userManager->getUser(htmlspecialchars($_GET['idUser']));
}
if (isset($_GET['idUser'])) {
    $userManager->remove($user);
    echo 'Félicitations, l\'utilisateur a bien été supprimé';
}
$viewG->footer();
开发者ID:Altraya,项目名称:CalendarFactory,代码行数:22,代码来源:supprimerUser.php

示例6: PropertyManager

// set website timezone
date_default_timezone_set($oSettingsManager->getValue("TimeZone", $fusebox['defaultTimeZone'], "STRING", "Default timezone for website"));
$oPropertyManager = new PropertyManager($oDB, $fusebox['tableProperties'], $fusebox['tableDictionary']);
// user manager initialization
$oUserManager = new UserManager($oDB, $fusebox['tableUsers'], $fusebox['defaultUser'], $fusebox['developer'], $fusebox['password']);
if (!$oUserManager->initialize()) {
    _throw("FNoUsersTable", "There is no users table called \"{$fusebox['tableUsers']}\" present in DB");
}
// adding or checking existence of developer, setting developer password to default
if (!$oUserManager->resetPassword($fusebox['developer'], 0, $fusebox['password'])) {
    if (!$oUserManager->checkUser($fusebox['developer'])) {
        $oDev = new User(0, $fusebox['developer']);
        $oDev->setRegisteredDate();
        $oDev->setPassword($fusebox['password']);
        if ($oUserManager->addUser($oDev)) {
            if (!($oDev = $oUserManager->getUser($fusebox['developer']))) {
                _throw("FNoDeveloperUserFound", "No developer found... again! DB corrupted ?");
            }
            unset($oDev);
        } else {
            _throw("FCannotAddDeveloper", "Cannot add developer");
        }
    } else {
        _throw("FCannotResetDeveloperPassword", "Cannot reset password for developer");
    }
}
// getting user
$boolFreshUser = false;
if (!isset($oUser) || !is_a($oUser, "User")) {
    if ($oUserManager->checkUser($fusebox['defaultUser'])) {
        if (!($oUser = $oUserManager->getUser($fusebox['defaultUser']))) {
开发者ID:rodionbykov,项目名称:zCMS,代码行数:31,代码来源:myGlobals.php

示例7: UserManager

     $user = $userManager->getUser($target);
     include '../views/user_view.php';
     break;
 case 'delete_user':
     $userManager = new UserManager();
     $userManager->delete($target);
     header('Location: user.php');
     break;
 case 'add_user':
     $userManager = new UserManager();
     $user = new User();
     include '../views/user_add_edit.php';
     break;
 case 'edit_user':
     $userManager = new UserManager();
     $user = $userManager->getUser($target);
     include '../views/user_add_edit.php';
     break;
 case 'save_user':
     $userManager = new UserManager();
     $arr = array();
     $arr["id"] = isset($_GET["id"]) ? $_GET["id"] : '';
     $arr["species"] = isset($_GET["species"]) ? $_GET["species"] : '';
     $arr["amount"] = isset($_GET["amount"]) ? $_GET["amount"] : '';
     $arr["ph"] = isset($_GET["ph"]) ? $_GET["ph"] : '';
     $arr["temp"] = isset($_GET["temp"]) ? $_GET["temp"] : '';
     $user = new User();
     $user->hydrate($arr);
     $userManager->save($user);
     header('Location: user.php');
     break;
开发者ID:php-joe,项目名称:module5v2,代码行数:31,代码来源:user.php

示例8: autoReportEmail

 public function autoReportEmail(array $auctionIDs, $sellerID)
 {
     $auctionManager = new AuctionManager();
     $userManager = new UserManager($sellerID);
     $user = $userManager->getUser($sellerID);
     $to = $user->email;
     $subject = "Daily Report";
     $message = '<html><body>';
     $message .= '<table rules="all" style="border-color: #666;" cellpadding="10">';
     $message .= '<p>Hey ' . $user->firstName . ' below is your daily sales report</p>';
     foreach ($auctionIDs as $auctionID) {
         $details = $auctionManager->getAuctionDetail($auctionID);
         $itemName = $details->itemName;
         $expirationDate = DateTimeUtils::formatDate($details->endDate);
         $maxBid = $details->maxBid;
         $watchers = $details->watchers;
         $noBidders = $details->numberOfBidders;
         $bidNo = $details->numberOfBids;
         $views = $details->views;
         $message .= "<tr style='background: #eee;'><td><strong>Item Name:</strong> </td><td>" . $itemName . "</td></tr>";
         $message .= "<tr><td><strong>Expiration date:</strong> </td><td>" . $expirationDate . "</td></tr>";
         $message .= "<tr><td><strong>Highest bid</strong> </td><td>" . $maxBid . "</td></tr>";
         $message .= "<tr><td><strong>No of bids:</strong> </td><td>" . $bidNo . "</td></tr>";
         $message .= "<tr><td><strong>No of bidders</strong> </td><td>" . $noBidders . "</td></tr>";
         $message .= "<tr><td><strong>No of watchers:</strong> </td><td>" . $watchers . "</td></tr>";
         $message .= "<tr><td><strong>No of views:</strong> </td><td>" . $views . "</td></tr>";
         $message .= "<br>";
     }
     $message .= "<p><br>Best regards,<br>The BidBucket Team</p>";
     $this->sendEmail($to, $subject, $message);
 }
开发者ID:melindafekete,项目名称:AuctionSystem_COMPGC06,代码行数:31,代码来源:EmailManager.php

示例9: getNavigation

    public function getNavigation($params = null)
    {
        $app_mgr = new ApplicationManager();
        $app_nm = $app_mgr->getApplicationName();
        $page_cd = $this->page['page_cd'];
        /*$guest_div = 0;
          if (Utils::isPresent($params)){
            $guest_div = $params['guest_div'];
          }*/
        $user_mgr = new UserManager();
        $user = $user_mgr->getUser();
        $trial_div = $user['trial_div'];
        $trial_end_at = $user['trial_end_at'];
        $guest_div = $user['guest_div'];
        $show_question_slider = $user['show_question_slider'];
        $prospect_class = $page_cd === 'prospect' ? 'prospect_nav' : 'prospect_nav out';
        $company_class = $page_cd === 'company' ? 'company_nav' : 'company_nav out';
        $customer_class = $page_cd === 'customer' ? 'customer_nav' : 'customer_nav out';
        $business_discussion_class = $page_cd === 'business_discussion' ? 'business_discussion_nav' : 'business_discussion_nav out';
        $merchandise_class = $page_cd === 'merchandise' ? 'merchandise_nav' : 'merchandise_nav out';
        $canvas_class = $page_cd === 'canvas' ? 'canvas_nav' : 'canvas_nav out';
        $project_class = $page_cd === 'project' ? 'project_nav' : 'project_nav out';
        $period_class = $page_cd === 'period' ? 'period_nav' : 'period_nav out';
        $data_class = $page_cd === 'report_flexible' ? 'data_nav' : 'data_nav out';
        $help_class = $page_cd === 'help' ? 'help' : 'help_nav out';
        $settings_class = $page_cd === 'settings' ? 'settings_nav' : 'settings_nav out';
        $navi = <<<EOS
<nav class="navbar navbar-default" role="navigation">
  <div class="container-fluid">

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <div class="nav navbar-nav">
        <a href="/canvas/canvas.php" target="_self" style="float: left; margin-top: 20px; margin-left: -10px;">
          <img src="/common/images/top_logo.png" alt="" />
        </a>
        <!--<form style="float: right; margin: 10px 15px; width: 200px" class="smart-form">
          <label class="select">
            <select id="organSelect">
            </select> <i></i>
          </label>
        </form>-->
      </div>
      <div>
      <ul class="nav navbar-nav navbar-right common-menu-bar" style=" margin-top: 20px; margin-left: 10px; margin-right: -26px; width: 571px; float: right;">
        <li rel="tooltip" data-placement="bottom" data-original-title="キャンバス">
          <a href="/canvas/canvas.php" class="{$canvas_class}" target="_self"></a>
        </li>
        <li rel="tooltip" data-placement="bottom" data-original-title="見込客">
          <a href="/prospect/prospect.php" class="{$prospect_class}" target="_self"></a>
        </li>
        <li rel="tooltip" data-placement="bottom" data-original-title="会社">
          <a href="/company/company.php" class="{$company_class}" target="_self"></a>
        </li>
        <li rel="tooltip" data-placement="bottom" data-original-title="担当者">
          <a href="/customer/customer.php" class="{$customer_class}" target="_self"></a>
        </li>
        <li rel="tooltip" data-placement="bottom" data-original-title="商談">
          <a href="/business_discussion/business_discussion.php" class="{$business_discussion_class}" target="_self"></a>
        </li>
        <li rel="tooltip" data-placement="bottom" data-original-title="商品">
          <a href="/merchandise/merchandise.php" class="{$merchandise_class}" target="_self"></a>
        </li>
        <li rel="tooltip" data-placement="bottom" data-original-title="プロジェクト">
          <a href="/project/project.php" class="{$project_class}" target="_self"></a>
        </li>
        <li rel="tooltip" data-placement="bottom" data-original-title="レポート">
          <a href="/report_flexible/report_flexible.php" class="{$data_class}" target="_self"></a>
        </li>
        <li rel="tooltip" data-placement="bottom" data-original-title="ヘルプ">
          <a href="http://chikyu.net/help/" target="_blank" class="{$help_class}" target="_self"></a>
        </li>
        <li>
          <a href="/login/php/logout.php" class="logout_button" target="_self">ログアウト</a>
        </li>
EOS;
        $navi .= '<li class="divider-vertical"></li>' . '<div class="btn-group">' . '<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" rel="tooltip" data-placement="bottom" data-original-title="設定" style="height: 45px; box-shadow: none; background: #eee; border: 0; border-radius: 0;">' . '<img src="/common/images/function.png" />' . '</button>' . '<ul class="dropdown-menu">';
        if ($guest_div == 0) {
            //正式ユーザー
            $navi .= '<li>' . '<a href="/organ/organ.php" target="_self">組織設定</a>' . '</li>' . '<li>' . '<a href="/user/user.php" target="_self">ユーザー一覧</a>' . '</li>' . '<li class="divider"></li>' . '<li>' . '<a href="/prospect/prospect.php/item_settings" target="_self">項目設定&nbsp;‐&nbsp;見込客</a>' . '</li>' . '<li>' . '<a href="/company/company.php/item_settings" target="_self">項目設定&nbsp;‐&nbsp;会社</a>' . '</li>' . '<li>' . '<a href="/customer/customer.php/item_settings" target="_self">項目設定&nbsp;‐&nbsp;担当者</a>' . '</li>' . '<li>' . '<a href="/business_discussion/business_discussion.php/item_settings" target="_self">項目設定&nbsp;‐&nbsp;商談</a>' . '</li>';
            $navi .= '<li>' . '<a href="/business_discussion/business_discussion.php/repeat_recorded_item_settings" target="_self">項目設定&nbsp;‐&nbsp;商談の繰り返し計上</a>' . '</li>';
            $navi .= '<li>' . '<a href="/merchandise/merchandise.php/item_settings" target="_self">項目設定&nbsp;‐&nbsp;商品マスタ</a>' . '</li>' . '<li>' . '<a href="/activity_history/activity_history.php/item_settings" target="_self">項目設定&nbsp;‐&nbsp;活動履歴</a>' . '</li>' . '<li class="divider"></li>' . '<li>' . '<a id="tourNavigation" href="javascript:void(0)">ツアーの開始</a>' . '</li>' . '<li class="divider"></li>' . '<div class="common-checkbox" style="padding: 0 5px;">' . '<input type="checkbox" id="toggleQuestionCheck" ';
            if ($show_question_slider == 1) {
                $navi .= 'checked';
            }
            $navi .= ' />' . '<label for="toggleQuestionCheck" style="margin: 0;">質問フォーム表示</label>' . '</div>' . '<li class="divider"></li>' . '<li>' . '<a href="/contract/contract.php" target="_self">契約設定</a>' . '</li>';
        } else {
            //ゲストユーザー
            $navi .= '<li>' . '<a href="#" class="disabled-link" disabled="disabled">組織設定</a>' . '</li>' . '<li>' . '<a href="#" class="disabled-link" disabled="disabled">ユーザー一覧</a>' . '</li>' . '<li class="divider"></li>' . '<li>' . '<a href="#" class="disabled-link" disabled="disabled">契約設定</a>' . '</li>';
        }
        $navi .= '</ul>' . '</div>';
        $navi .= <<<EOS
      </ul>
        <label class="common-select large" style="float: right; margin-top: 20px;">
          <select id="organSelect">
          </select>
          <i></i>
        </label>
EOS;
        //トライアル
//.........这里部分代码省略.........
开发者ID:nakanokenichi,项目名称:Hello-World,代码行数:101,代码来源:PageManager.php


注:本文中的UserManager::getUser方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。