本文整理汇总了PHP中UserDAO::getUsers方法的典型用法代码示例。如果您正苦于以下问题:PHP UserDAO::getUsers方法的具体用法?PHP UserDAO::getUsers怎么用?PHP UserDAO::getUsers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserDAO
的用法示例。
在下文中一共展示了UserDAO::getUsers方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getUserList
/**
* Retorna lista de usuários
*/
public function getUserList()
{
$UserDAO = new UserDAO();
return $UserDAO->getUsers();
}
示例2: elseif
} elseif (isset($_GET['artistsignup'])) {
if ($_SERVER['REQUEST_METHOD'] === "POST" && isset($_SESSION['user'])) {
$logger->writeLog("Updating: " . $request_data->name);
$fnHash = ArtistDAO::insertArtist($request_data->name, $request_data->bio, $request_data->twitter_id, $request_data->facebook_id, $request_data->google_id, $request_data->url, $request_data->instagram_id, $request_data->tumblr_id, $request_data->img_url, $request_data->img_file_path, $request_data->area, 0);
if ($fnHash['ok']) {
//get created artist
$fnHash2 = ArtistDAO::getCreatedArtistId($request_data->name);
if ($fnHash2['ok']) {
//link user to artist
$fnHash3 = ArtistDAO::createUserToArtistLink($fnHash2['result'], $_SESSION['user']);
//send email to requesting user
//send email to admin
if ($fnHash3['ok']) {
$userTypeHash = UserDAO::setUserAsArtistType($_SESSION['user']);
if ($userTypeHash['ok']) {
$userFnHash = UserDAO::getUsers($_SESSION['user']);
if ($userFnHash['ok']) {
$toUser = mail($userFnHash['result'][0]['email'], 'New SpireArtist Request', 'Thank you for your request! We will be contacting you soon.');
$toAdmin = mail('admin@spiresessions.com', 'New SpireArtist Request', 'Request from user ' . $userFnHash['result'][0]['email'] . ' for new artist ' . $fnHash2['result'] . '-' . $request_data->name);
if ($toUser && $toAdmin) {
JsonResponse::sendResponse(200, 'Email Sent to ' . $userFnHash['result'][0]['email']);
} else {
if (!$toUser) {
JsonResponse::sendResponse(400, 'Email Not Sent to ' . $userFnHash['result'][0]['email']);
}
if (!$toAdmin) {
JsonResponse::sendResponse(400, 'Email Not Sent to admin');
}
}
} else {
JsonResponse::sendResponse(400, $userFnHash['reason']);
示例3: user
public function user()
{
$infosUser = new UserDAO();
$infos = $infosUser->getInfoUser($_SESSION['idUser']);
if ($infos['type'] == 'Admin') {
$userView = new UserView();
$managerUser = new UserDAO();
if (isset($_GET['tri'])) {
if ($_GET['tri'] == 'Admin') {
$mesUtilisateurs = $managerUser->getUsersByType($_GET['tri']);
} else {
if ($_GET['tri'] == 'Professeur') {
$mesUtilisateurs = $managerUser->getUsersByType($_GET['tri']);
} else {
if ($_GET['tri'] == 'Etudiant') {
$mesUtilisateurs = $managerUser->getUsersByType($_GET['tri']);
} else {
$mesUtilisateurs = $managerUser->getUsers();
}
}
}
} else {
$mesUtilisateurs = $managerUser->getUsers();
}
echo $userView->getView($mesUtilisateurs);
} else {
$_SESSION['error'] = 'Vous n\'avez pas les droits requis pour accéder à cette page';
$_SESSION['display_msg_error'] = true;
$this->profile();
}
}