本文整理汇总了PHP中CMediusers::store方法的典型用法代码示例。如果您正苦于以下问题:PHP CMediusers::store方法的具体用法?PHP CMediusers::store怎么用?PHP CMediusers::store使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMediusers
的用法示例。
在下文中一共展示了CMediusers::store方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CDiscipline
if ($discipline_name = $results[$i]["discipline_name"]) {
$discipline = new CDiscipline();
$discipline->text = strtoupper($discipline_name);
$discipline->loadMatchingObject();
if ($discipline->_id) {
$mediuser->discipline_id = $discipline->_id;
} else {
$unfound["discipline_name"][$discipline_name] = true;
}
}
// Dry run to check references
if ($dryrun) {
continue;
}
$mediuser->unescapeValues();
$msg = $mediuser->store();
if ($msg) {
CAppUI::setMsg($msg, UI_MSG_ERROR);
$results[$i]["error"] = $msg;
$results[$i]["username"] = "";
$results[$i]["password"] = "";
continue;
}
CAppUI::setMsg("Utilisateur créé", UI_MSG_OK);
$mediuser->insFunctionPermission();
$mediuser->insGroupPermission();
$results[$i]["result"] = 0;
$results[$i]["username"] = $mediuser->_user_username;
$results[$i]["password"] = $mediuser->_user_password;
$number_idex = $results[$i]["idex"];
if (!$number_idex) {
示例2: trim
$mediuser->_user_last_name = trim($_user['lastname']);
$mediuser->_user_first_name = trim($_user['firstname']);
$mediuser->makeUsernamePassword($mediuser->_user_first_name, $mediuser->_user_last_name);
$where = array();
$ljoin["users"] = "users_mediboard.user_id = users.user_id";
$where['users.user_username'] = "= '" . $mediuser->_user_username . "'";
$mediuser->loadObject($where, null, null, $ljoin);
if ($mediuser->_id) {
CAppUI::stepAjax("Cabinet_mediuser_prenom%s_nom%s_username%s_already_exist", UI_MSG_WARNING, $mediuser->_user_first_name, $mediuser->_user_last_name, $mediuser->_user_username);
continue;
}
$mediuser->function_id = $cabinet->_id;
//praticien
if ($type == "prat") {
$mediuser->_profile_id = $profile_prat;
$mediuser->_user_type = 13;
}
//secretaire
if ($type == "sec") {
$mediuser->_profile_id = $profile_sec;
$mediuser->_user_type = 10;
}
//store
if ($msg = $mediuser->store()) {
CAppUI::stepAjax($msg, UI_MSG_WARNING);
continue;
}
CAppUI::stepAjax("Cabinet_user_created_name%s_firstname%s_username%s_with_password_%s", UI_MSG_OK, $mediuser->_user_last_name, $mediuser->_user_first_name, $mediuser->_user_username, $mediuser->_user_password);
}
}
CAppUI::callbackAjax("changePagePrimaryUsers", $cabinet->_id);