本文整理匯總了PHP中User_Model::getOneUser方法的典型用法代碼示例。如果您正苦於以下問題:PHP User_Model::getOneUser方法的具體用法?PHP User_Model::getOneUser怎麽用?PHP User_Model::getOneUser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類User_Model
的用法示例。
在下文中一共展示了User_Model::getOneUser方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: emDirect
}
if (strlen($password) < 6) {
emDirect('./user.php?error_pwd_len=1');
}
if ($password != $password2) {
emDirect('./user.php?error_pwd2=1');
}
$PHPASS = new PasswordHash(8, true);
$password = $PHPASS->HashPassword($password);
$User_Model->addUser($login, $password, $role, $ischeck);
$CACHE->updateCache(array('sta', 'user'));
emDirect('./user.php?active_add=1');
}
if ($action == 'edit') {
$uid = isset($_GET['uid']) ? intval($_GET['uid']) : '';
$data = $User_Model->getOneUser($uid);
extract($data);
$ex1 = $ex2 = $ex3 = $ex4 = '';
if ($role == ROLE_WRITER) {
$ex1 = 'selected="selected"';
} elseif ($role == ROLE_ADMIN) {
$ex2 = 'selected="selected"';
}
if ($ischeck == 'n') {
$ex3 = 'selected="selected"';
} elseif ($ischeck == 'y') {
$ex4 = 'selected="selected"';
}
include View::getView('header');
require_once View::getView('useredit');
include View::getView('footer');
示例2: extract
<?php
/**
* 個人資料
* @copyright (c) Emlog All Rights Reserved
*/
require_once 'globals.php';
if ($action == '') {
$User_Model = new User_Model();
$row = $User_Model->getOneUser(UID);
extract($row);
$icon = '';
if ($photo) {
$imgsize = chImageSize($photo, Option::ICON_MAX_W, Option::ICON_MAX_H);
$token = LoginAuth::genToken();
$icon = "<img src=\"{$photo}\" width=\"{$imgsize['w']}\" height=\"{$imgsize['h']}\" style=\"border:1px solid #CCCCCC;padding:1px;\" />\n <br /><a href=\"javascript: em_confirm(0, 'avatar', '{$token}');\">刪除頭像</a>";
} else {
$icon = '<img src="./views/images/avatar.jpg" />';
}
include View::getView('header');
require_once View::getView('blogger');
include View::getView('footer');
View::output();
}
if ($action == 'update') {
LoginAuth::checkToken();
$User_Model = new User_Model();
$photo = isset($_POST['photo']) ? addslashes(trim($_POST['photo'])) : '';
$nickname = isset($_POST['name']) ? addslashes(trim($_POST['name'])) : '';
$email = isset($_POST['email']) ? addslashes(trim($_POST['email'])) : '';
$description = isset($_POST['description']) ? addslashes(trim($_POST['description'])) : '';