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


PHP UserDao::selectUserById方法代码示例

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


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

示例1: modifyUser

 public function modifyUser()
 {
     $username = $_POST['userName'];
     $userLastName = $_POST['userLastName'];
     $userPassword = $_POST['password'];
     $passwordAgain = $_POST['rePassword'];
     $userDao = new UserDao();
     $userInfoDao = new UserInfoDao();
     $uid = getUID();
     $user = $userDao->selectUserById($uid);
     $user->lastName = $userLastName;
     $user->password = $userPassword;
     $user->name = $username;
     User::readProperties($user, $_POST);
     $user->setInstitutionName($_POST['InstitutionName']);
     $userDao->updateUser($user, $uid);
     $userInfoDao->modifyUserInfo($id, $user);
 }
开发者ID:laiello,项目名称:qnet-ua2011,代码行数:18,代码来源:modifyUserController.php

示例2: dirname

<div id="wrapper">
    <?php 
include "fragment/header.php";
?>
    <?php 
require_once dirname(__FILE__) . '\\..\\util.php';
require_controller("sessionController");
require_dao('userDAO');
require_model("User");
use Qnet\Dao\UserDAO;
use Qnet\Model\User;
use Qnet\Controller\SessionController;
$userDaoInstance = new UserDao();
$sc = new SessionController();
$uid = $sc->getUID();
$userInstance = $userDaoInstance->selectUserById($uid);
$username = $userInstance->getName();
$lastName = $userInstance->getLastName();
$userPassword = $userInstance->getPassword();
$gender = $userInstance->gender;
$maritalStatus = $userInstance->maritalSt;
$studies = $userInstance->studies;
$institutionName = $userInstance->InstitutionName;
$country = $userInstance->country;
$religion = $userInstance->getReligion();
?>

    <div id="page">
        <div id="content">
            <div class="post">
                <h2 class="title">Modify your information here please</h2>
开发者ID:laiello,项目名称:qnet-ua2011,代码行数:31,代码来源:modifyUser.php

示例3: dirname

<?php

/**
 * Created by IntelliJ IDEA.
 * User: Tomas Alabes
 * Date: 15/09/2010
 * Time: 18:42:45
 * To change this template use File | Settings | File Templates.
 */
require_once dirname(__FILE__) . '\\..\\util.php';
require_dao('userDao');
use Qnet\Dao\UserDAO;
$userDao = new UserDao();
$uid = 1;
$user = $userDao->selectUserById($uid);
$user->lastName = "Gimenez";
$user->password = "dg";
$user->name = "Daniel";
$userDao->updateUser($user, $uid);
$userUpdated = $userDao->selectUserById($uid);
if ($userUpdated->password != $user->password || $userUpdated->lastName != $user->lastName || $userUpdated->name != $user->name) {
    echo "can not update user";
}
开发者ID:laiello,项目名称:qnet-ua2011,代码行数:23,代码来源:modifyUserTest.php


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