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


PHP CUser::loadRefMediuser方法代码示例

本文整理汇总了PHP中CUser::loadRefMediuser方法的典型用法代码示例。如果您正苦于以下问题:PHP CUser::loadRefMediuser方法的具体用法?PHP CUser::loadRefMediuser怎么用?PHP CUser::loadRefMediuser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CUser的用法示例。


在下文中一共展示了CUser::loadRefMediuser方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: createIndeterminateDoctor

 /**
  * Création du "médecin" indéterminé
  *
  * @return integer
  */
 function createIndeterminateDoctor()
 {
     $sender = $this->_ref_sender;
     $user = new CUser();
     $user->user_last_name = CAppUI::conf("hl7 indeterminateDoctor") . " {$sender->group_id}";
     if (!$user->loadMatchingObjectEsc()) {
         $mediuser = new CMediusers();
         $mediuser->_user_last_name = $user->user_last_name;
         return $this->createDoctor($mediuser);
     }
     return $user->loadRefMediuser()->_id;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:17,代码来源:CHL7v2RecordAdmit.class.php

示例2: getMedecins

 /**
  * Récupération des médecins
  *
  * @param DOMNode $node    Node
  * @param CSejour $mbVenue Venue
  *
  * @return CSejour
  */
 function getMedecins(DOMNode $node, CSejour $mbVenue)
 {
     $xpath = new CHPrimXPath($node->ownerDocument);
     $sender = $this->_ref_echange_hprim->_ref_sender;
     $medecins = $xpath->queryUniqueNode("hprim:medecins", $node);
     if ($medecins instanceof DOMElement) {
         $medecin = $medecins->childNodes;
         foreach ($medecin as $_med) {
             $mediuser_id = $this->getMedecin($_med);
             $lien = $xpath->getValueAttributNode($_med, "lien");
             if ($lien == "rsp") {
                 $mbVenue->praticien_id = $mediuser_id;
             }
         }
     }
     // Dans le cas ou la venue ne contient pas de medecin responsable
     // Attribution d'un medecin indeterminé
     if (!$mbVenue->praticien_id) {
         $user = new CUser();
         $mediuser = new CMediusers();
         $user->user_last_name = CAppUI::conf("hprimxml medecinIndetermine") . " {$sender->group_id}";
         if (!$user->loadMatchingObject()) {
             $mediuser->_user_last_name = $user->user_last_name;
             $mediuser->_id = $this->createPraticien($mediuser);
         } else {
             $user->loadRefMediuser();
             $mediuser = $user->_ref_mediuser;
         }
         $mbVenue->praticien_id = $mediuser->_id;
     }
     return $mbVenue;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:40,代码来源:CHPrimXMLEvenementsPatients.class.php

示例3: mapTo

 /**
  * @param CUser $user
  * @param array $values
  *
  * @return CUser
  */
 static function mapTo(CUser $user, $values)
 {
     $user->user_username = self::getValue($values, "samaccountname");
     $user->user_first_name = self::getValue($values, "givenname");
     $user->user_last_name = self::getValue($values, "sn") ? self::getValue($values, "sn") : self::getValue($values, "samaccountname");
     $user->user_phone = self::getValue($values, "telephonenumber");
     $user->user_email = self::getValue($values, "mail");
     $whencreated = null;
     if ($when_created = self::getValue($values, "whencreated")) {
         $whencreated = CMbDT::date(CMbDT::dateTimeFromAD($when_created));
     }
     $accountexpires = null;
     if ($account_expires = self::getValue($values, "accountexpires")) {
         // 1000000000000000000 = 16-11-4769 01:56:35
         if ($account_expires < 1000000000000000000) {
             $accountexpires = CMbDT::date(CMbDT::dateTimeFromLDAP($account_expires));
         }
     }
     // 66048,Account: Enabled - DONT_EXPIRE_PASSWORD
     // 66080,Account: Enabled - DONT_EXPIRE_PASSWORD - PASSWD_NOTREQD
     // 66050 = Disabled
     $actif = self::getValue($values, "useraccountcontrol") == 66050 ? 0 : 1;
     $user->loadRefMediuser();
     if ($user->_id) {
         $mediuser = $user->_ref_mediuser;
         $mediuser->actif = $actif;
         $mediuser->deb_activite = $whencreated;
         $mediuser->fin_activite = $accountexpires;
         $mediuser->_ldap_store = true;
         $mediuser->store();
     }
     $user->_user_actif = $actif;
     $user->_user_deb_activite = $whencreated;
     $user->_user_fin_activite = $accountexpires;
     return $user;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:42,代码来源:CLDAP.class.php

示例4: checkPasswordAttempt

 /**
  * Check wether login/password is found
  * Handle password attempts count
  *
  * @param CUser $user User whose password attempt to check
  *
  * @return bool True is attempt is successful
  */
 static function checkPasswordAttempt(CUser $user)
 {
     $sibling = new CUser();
     $sibling->user_username = $user->user_username;
     $sibling->loadMatchingObject();
     $sibling->loadRefMediuser();
     $mediuser = $sibling->_ref_mediuser;
     if ($mediuser && $mediuser->_id) {
         if (!$mediuser->actif) {
             self::setMsg("Auth-failed-user-deactivated", UI_MSG_ERROR);
             return false;
         }
         $today = CMbDT::date();
         $deb = $mediuser->deb_activite;
         $fin = $mediuser->fin_activite;
         // Check if the user is in his activity period
         if ($deb && $deb > $today || $fin && $fin <= $today) {
             self::setMsg("Auth-failed-user-deactivated", UI_MSG_ERROR);
             return false;
         }
     }
     if ($sibling->_login_locked) {
         self::setMsg("Auth-failed-user-locked", UI_MSG_ERROR);
         return false;
     }
     // Wrong login and/or password
     if (!$user->_id) {
         self::setMsg("Auth-failed-combination", UI_MSG_ERROR);
         // If the user exists, but has given a wrong password let's increment his error count
         if ($user->loginErrorsReady() && $sibling->_id) {
             $sibling->user_login_errors++;
             $sibling->store();
             $remainingAttempts = max(0, self::conf("admin CUser max_login_attempts") - $sibling->user_login_errors);
             self::setMsg("Auth-failed-tried", UI_MSG_ERROR, $sibling->user_login_errors, $remainingAttempts);
         }
         return false;
     }
     return true;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:47,代码来源:CAppUI.class.php

示例5: CUser

        }
        $user = new CUser();
        $user->user_last_name = $results[$i]["lastname"];
        $user->user_first_name = $results[$i]["firstname"];
        $count = $user->countMatchingList();
        if ($count == "0") {
            $results[$i]["error"] = "L'utilisateur n'a pas été retrouvé dans Mediboard";
            $i++;
            continue;
        } elseif ($count > 1) {
            $results[$i]["error"] = "Plusieurs utilisateurs correspondent à cette recherche";
            $i++;
            continue;
        }
        $user->loadMatchingObject();
        $mediuser = $user->loadRefMediuser();
        $mediuser->adeli = $results[$i]["adeli"];
        if ($msg = $mediuser->store()) {
            CAppUI::setMsg($msg, UI_MSG_ERROR);
            $results[$i]["error"] = $msg;
            $i++;
            continue;
        }
        $i++;
    }
}
CAppUI::callbackAjax('$("systemMsg").insert', CAppUI::getMsg());
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("results", $results);
$smarty->display("update_mediusers_csv.tpl");
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:update_mediusers_csv.php

示例6: getDoctor

 /**
  * Return or create the doctor of the message
  *
  * @param DOMNode $node Node
  *
  * @return CMediusers|int|null
  */
 function getDoctor($node)
 {
     $xpath = new CHPrimSanteMessageXPath($node ? $node->ownerDocument : $this);
     $nodeDoctor = $xpath->query("P.13", $node);
     $code = null;
     $nom = null;
     $prenom = null;
     $type_code = null;
     foreach ($nodeDoctor as $_node_doctor) {
         $code = $xpath->queryTextNode("CNA.1", $_node_doctor);
         $nom = $xpath->queryTextNode("CNA.2/PN.1", $_node_doctor);
         $prenom = $xpath->queryTextNode("CNA.2/PN.2", $_node_doctor);
         $type_code = $xpath->queryTextNode("CNA.3", $_node_doctor);
         if ($code && $nom) {
             break;
         }
     }
     $mediuser = new CMediusers();
     $mediuser->_user_last_name = $nom;
     switch ($type_code) {
         case "R":
             $mediuser->rpps = $code;
             break;
         case "A":
             $mediuser->adeli = $code;
             break;
         default:
             if (strlen($code) == 9 && luhn($code)) {
                 $mediuser->adeli = $code;
             }
             if (strlen($code) == 11 && luhn($code)) {
                 $mediuser->rpps = $code;
             }
     }
     // Cas où l'on a aucune information sur le médecin
     if (!$mediuser->rpps && !$mediuser->adeli && !$mediuser->_id && !$mediuser->_user_last_name) {
         return null;
     }
     $sender = $this->_ref_sender;
     $ds = $mediuser->getDS();
     $ljoin = array();
     $ljoin["functions_mediboard"] = "functions_mediboard.function_id = users_mediboard.function_id";
     $where = array();
     $where["functions_mediboard.group_id"] = " = '{$sender->group_id}'";
     if ($mediuser->rpps || $mediuser->adeli) {
         if ($mediuser->rpps) {
             $where[] = $ds->prepare("rpps = %", $mediuser->rpps);
         }
         if ($mediuser->adeli) {
             $where[] = $ds->prepare("adeli = %", $mediuser->adeli);
         }
         // Dans le cas où le praticien recherché par son ADELI ou RPPS est multiple
         if ($mediuser->countList($where, null, $ljoin) > 1) {
             $ljoin["users"] = "users_mediboard.user_id = users.user_id";
             $where[] = $ds->prepare("users.user_last_name = %", $nom);
         }
         $mediuser->loadObject($where, null, null, $ljoin);
         if ($mediuser->_id) {
             return $mediuser;
         }
     }
     $user = new CUser();
     $ljoin = array();
     $ljoin["users_mediboard"] = "users.user_id = users_mediboard.user_id";
     $ljoin["functions_mediboard"] = "functions_mediboard.function_id = users_mediboard.function_id";
     $where = array();
     $where["functions_mediboard.group_id"] = " = '{$sender->group_id}'";
     $where[] = $ds->prepare("users.user_first_name = %", $prenom);
     $where[] = $ds->prepare("users.user_last_name = %", $nom);
     $order = "users.user_id ASC";
     if ($user->loadObject($where, $order, null, $ljoin)) {
         return $user->loadRefMediuser();
     }
     $mediuser->_user_first_name = $prenom;
     $mediuser->_user_last_name = $nom;
     return $this->createDoctor($mediuser);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:84,代码来源:CHPrimSanteMessageXML.class.php


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