本文整理汇总了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);
}
示例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>
示例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";
}