本文整理汇总了PHP中UserDao::updateUser方法的典型用法代码示例。如果您正苦于以下问题:PHP UserDao::updateUser方法的具体用法?PHP UserDao::updateUser怎么用?PHP UserDao::updateUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserDao
的用法示例。
在下文中一共展示了UserDao::updateUser方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update
public function update()
{
$name = $_POST['name'];
$phone = $_POST['phone'];
$sex = $_POST['sex'];
$birthday = $_POST['birthday'];
$phone = '18958142694';
$UserDao = new UserDao();
$update = $UserDao->updateUser($name, $phone, $sex, $birthday);
}
示例2: 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);
}
示例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";
}