当前位置: 首页>>代码示例>>PHP>>正文


PHP UserDAO::getUsers方法代码示例

本文整理汇总了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();
 }
开发者ID:GeBender,项目名称:Teste-DotGroup,代码行数:8,代码来源:MyUserClass.php

示例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']);
开发者ID:jls14,项目名称:SpireSessions,代码行数:31,代码来源:index.php

示例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();
     }
 }
开发者ID:kokno,项目名称:closeClassroom_german_toson,代码行数:31,代码来源:MainController.class.php


注:本文中的UserDAO::getUsers方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。