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


PHP CUser::checkPassword方法代码示例

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


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

示例1: CMediusers

        CAppUI::setMsg("Mot de passe incorrect", UI_MSG_ERROR);
        echo CAppUI::getMsg();
        CApp::rip();
    }
    $object->cloture_activite_1 = 1;
    if ($msg = $object->store()) {
        CAppUI::setMsg($msg, UI_MSG_ERROR);
    } else {
        CAppUI::setMsg("COperation-msg-modify", UI_MSG_OK);
    }
}
if ($password_activite_4) {
    $anesth = new CMediusers();
    $anesth->load($anesth_id);
    if ($anesth->_id) {
        if (!CUser::checkPassword($anesth->_user_username, $password_activite_4)) {
            CAppUI::setMsg("Mot de passe incorrect", UI_MSG_ERROR);
            echo CAppUI::getMsg();
            CApp::rip();
        }
        $object->cloture_activite_4 = 1;
        if ($msg = $object->store()) {
            CAppUI::setMsg($msg, UI_MSG_ERROR);
        } else {
            CAppUI::setMsg("COperation-msg-modify", UI_MSG_OK);
        }
    }
}
// Transmission des actes CCAM
if (CAppUI::conf("dPpmsi transmission_actes") == "signature" && $object instanceof COperation && $object->testCloture()) {
    $object->loadRefs();
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:do_cloture_activite_aed.php

示例2:

if (!$username) {
    CAppUI::setMsg("Auth-failed-nousername", UI_MSG_ERROR);
} else {
    if ($user->user_type == 1 && (!$ldap_connection || $allow_login_as_ldap)) {
        // If admin: no need to give a password
        $_REQUEST['loginas'] = $username;
        CAppUI::login();
    } else {
        if (!$password) {
            CAppUI::setMsg("Auth-failed-nopassword", UI_MSG_ERROR);
        } else {
            $_REQUEST['loginas'] = $username;
            if (CAppUI::conf("admin LDAP ldap_connection")) {
                $_REQUEST['passwordas'] = $password;
                CAppUI::login(true);
            } else {
                if (!CUser::checkPassword($username, $password)) {
                    CAppUI::setMsg("Auth-failed-combination", UI_MSG_ERROR);
                } else {
                    CAppUI::login(true);
                }
            }
        }
    }
}
if ($msg = CAppUI::getMsg()) {
    echo $msg;
    return;
} else {
    CAppUI::callbackAjax('UserSwitch.reload');
}
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_login_as.php

示例3: CCodageCCAM

 * @version    $Revision$
 * @link       http://www.mediboard.org
 */
$codable_id = Cvalue::post('codable_id');
$codable_class = CValue::post('codable_class');
$praticien_id = Cvalue::post('praticien_id');
$date = Cvalue::post('date');
$user_password = CValue::post('user_password');
$lock_all_codages = Cvalue::post('lock_all_codages', 0);
$lock = CValue::post('lock', 1);
$codage = new CCodageCCAM();
$codage->praticien_id = $praticien_id;
$codage->codable_class = $codable_class;
$codage->codable_id = $codable_id;
if ($date && !$lock_all_codages) {
    $codage->date = $date;
}
$codages = $codage->loadMatchingList();
$user = CMediusers::get();
if (CAppUI::conf('ccam CCodable lock_codage_ccam') != 'password' || CAppUI::conf('ccam CCodable lock_codage_ccam') == 'password' && $user->_id && CUser::checkPassword($user->_user_username, $user_password)) {
    foreach ($codages as $_codage) {
        $_codage->locked = $lock;
        $_codage->store();
    }
    $msg = $lock ? 'CCodageCCAM-msg-codage_locked' : 'CCodageCCAM-msg-codage_unlocked';
    CAppUI::setMsg($msg, UI_MSG_OK);
    echo CAppUI::getMsg();
} elseif ($user_password && CAppUI::conf('ccam CCodable lock_codage_ccam') == 'password') {
    CAppUI::setMsg("CUser-user_password-nomatch", UI_MSG_ERROR);
    echo CAppUI::getMsg();
}
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_lock_codage.php

示例4: trim

/**
 * $Id$
 *
 * @category Admin
 * @package  Mediboard
 * @author   SARL OpenXtrem <dev@openxtrem.com>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
$password = trim(CValue::post('password'));
$lock = CValue::post('lock');
if ($lock) {
    $_SESSION['locked'] = true;
    return;
} else {
    if (!$password) {
        CAppUI::setMsg("Auth-failed-nopassword", UI_MSG_ERROR);
    }
    if (!CUser::checkPassword(CUser::get()->user_username, $password)) {
        CAppUI::setMsg("Auth-failed-combination", UI_MSG_ERROR);
    }
    if ($msg = CAppUI::getMsg()) {
        echo $msg;
        return;
    } else {
        CAppUI::callbackAjax('Session.unlock');
        $_SESSION['locked'] = false;
    }
}
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:30,代码来源:ajax_unlock_session.php

示例5:

/**
 * $Id: $
 *
 * @category Admin
 * @package  Mediboard
 * @author   SARL OpenXtrem <dev@openxtrem.com>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision: 18541 $
 * @link     http://www.mediboard.org
 */
$old_pwd = CValue::post("old_pwd");
$new_pwd1 = CValue::post("new_pwd1");
$new_pwd2 = CValue::post("new_pwd2");
$callback = CValue::post("callback");
// Vérification du mot de passe actuel de l'utilisateur courant
$user = CUser::checkPassword(CUser::get()->user_username, $old_pwd, true);
// Mot de passe actuel correct
if (!$user->_id) {
    CAppUI::stepAjax("CUser-user_password-nomatch", UI_MSG_ERROR);
}
if (!$user->canChangePassword()) {
    CAppUI::stepAjax("CUser-password_change_forbidden", UI_MSG_ERROR);
}
$allow_change_password = CAppUI::conf("admin LDAP allow_change_password");
$ldap_linked = $user->isLDAPLinked();
// Si utilisateur associé au LDAP et modif de mot de passe non autorisée: ERROR
if (!$allow_change_password && $ldap_linked) {
    CAppUI::stepAjax("CUser_associate-ldap-no-password-change", UI_MSG_ERROR);
}
// Mots de passe différents
if ($new_pwd1 != $new_pwd2) {
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:do_chpwd_aed.php

示例6: CUser

<?php

/**
 * $Id$
 *  
 * @category CompteRendu
 * @package  Mediboard
 * @author   SARL OpenXtrem <dev@openxtrem.com>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
$user_id = CValue::post("user_id");
$user_password = CValue::post("user_password");
$form_name = CValue::post("form_name");
$callback = CValue::post("callback");
$user = new CUser();
$user->load($user_id);
if ($user->_id && CUser::checkPassword($user->user_username, $user_password)) {
    CAppUI::callbackAjax($callback, $user_id, $form_name);
} else {
    CAppUI::setMsg("CUser-user_password-nomatch", UI_MSG_ERROR);
    echo CAppUI::getMsg();
}
开发者ID:fbone,项目名称:mediboard4,代码行数:24,代码来源:ajax_password_action.php

示例7: CMediusers

} else {
    $redirectUrl = "m=dPsalleOp&tab=vw_signature_actes&date={$date}";
}
// Chargement du praticien
$praticien = new CMediusers();
$praticien->load($praticien_id);
// Test du password
if (!$password) {
    CAppUI::setMsg("Veuillez saisir votre mot de passe", UI_MSG_ERROR);
    echo CAppUI::getMsg();
    if ($redirectUrl) {
        CAppUI::redirect($redirectUrl);
    }
    CApp::rip();
}
if (!CUser::checkPassword($praticien->_user_username, $password)) {
    CAppUI::setMsg("Mot de passe incorrect", UI_MSG_ERROR);
    echo CAppUI::getMsg();
    if ($redirectUrl) {
        CAppUI::redirect($redirectUrl);
    }
    CApp::rip();
}
// Chargement des actes CCAM à modifier
$acte_ccam = new CActeCCAM();
$acte_ccam->object_id = $object_id;
$acte_ccam->object_class = $object_class;
$acte_ccam->executant_id = $praticien->_id;
$acte_ccam->signe = 0;
/** @var CActeCCAM[] $actes_ccam */
$actes_ccam = $acte_ccam->loadMatchingList();
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:do_signature_actes_aed.php

示例8: check

 /**
  * @see parent::check()
  */
 function check()
 {
     $msg = null;
     $this->completeField("chir_id", "plageop_id", "sejour_id");
     if (!$this->_id && !$this->chir_id) {
         $msg .= "Praticien non valide ";
     }
     // Bornes du séjour
     $sejour = $this->loadRefSejour();
     $this->loadRefPlageOp();
     if ($this->_check_bounds && !$this->_forwardRefMerging) {
         if ($this->plageop_id !== null && !$sejour->entree_reelle) {
             $date = CMbDT::date($this->_datetime);
             $entree = CMbDT::date($sejour->entree_prevue);
             $sortie = CMbDT::date($sejour->sortie_prevue);
             if (!CMbRange::in($date, $entree, $sortie)) {
                 $msg .= "Intervention du {$date} en dehors du séjour du {$entree} au {$sortie}";
             }
         }
     }
     // Vérification de la signature de l'anesthésiste pour la visite de pré-anesthésie
     if ($this->fieldModified("prat_visite_anesth_id") && $this->prat_visite_anesth_id !== null && $this->prat_visite_anesth_id != CAppUI::$user->_id) {
         $anesth = new CUser();
         $anesth->load($this->prat_visite_anesth_id);
         if (!CUser::checkPassword($anesth->user_username, $this->_password_visite_anesth)) {
             $msg .= "Mot de passe incorrect";
         }
     }
     return $msg . parent::check();
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:33,代码来源:COperation.class.php

示例9: store

 /**
  * @see parent::store()
  */
 function store()
 {
     if ($this->validator_id) {
         // Verification du mot de passe
         if ($this->_validator_password) {
             $this->loadRefsFwd();
             if (!CUser::checkPassword($this->_ref_validator->_user_username, $this->_validator_password)) {
                 $this->validator_id = "";
                 return 'Le mot de passe entré n\'est pas correct';
             }
         }
         // Validator_id passé mais il ne faut pas l'enregistré
         /** @var self $old */
         $old = $this->loadOldObject();
         if (!$this->_validator_password && !$old->validator_id) {
             $this->validator_id = "";
         }
     }
     if ($this->validator_id && ($this->fieldModified("validator_id") || !$this->_id) && !$this->date_validate) {
         $this->date_validate = CMbDT::dateTime();
     }
     if ($msg = parent::store()) {
         return $msg;
     }
     // Sauvegarde des items cochés
     $items = $this->_items ? $this->_items : array();
     $types = $this->loadItemTypes();
     if (!empty($items)) {
         foreach ($types as $type) {
             $check_item = new CDailyCheckItem();
             $check_item->list_id = $this->_id;
             $check_item->item_type_id = $type->_id;
             $check_item->loadMatchingObject();
             $check_item->checked = isset($items[$type->_id]) ? $items[$type->_id] : "";
             $check_item->store();
             // Don't return if the item was not present
         }
     }
     return null;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:43,代码来源:CDailyCheckList.class.php


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