本文整理汇总了PHP中DbManager::get_user_by_id方法的典型用法代码示例。如果您正苦于以下问题:PHP DbManager::get_user_by_id方法的具体用法?PHP DbManager::get_user_by_id怎么用?PHP DbManager::get_user_by_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DbManager
的用法示例。
在下文中一共展示了DbManager::get_user_by_id方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Message
$smarty->assign('message', $message);
$smarty->assign('title', 'Index page');
set_redirect_header("index.php");
$smarty->display('index.tpl');
} else {
$message[] = new Message("Cannot change user info. Try again please.", Message::WARNING);
$user = $dbManager->get_user_by_id($user_id);
$user->setPassword(null);
$smarty->assign('user', $user);
$smarty->assign('message', $message);
$smarty->assign('title', 'Change user');
$smarty->display('change_user.tpl');
}
} else {
$message[] = new Message("Something goes wrong.", Message::WARNING);
$user = $dbManager->get_user_by_id($user_id);
$user->setPassword(null);
$smarty->assign('user', $user);
$smarty->assign('message', $message);
$smarty->assign('title', 'Change user');
$smarty->display('change_user.tpl');
}
} else {
$dbManager = new DbManager();
$user_id = $_GET['user_id'];
$user = $dbManager->get_user_by_id($user_id);
$user->setPassword(null);
$smarty->assign('user', $user);
$smarty->assign('title', 'Change user');
$smarty->display('change_user.tpl');
}