本文整理汇总了PHP中EfrontUser::getUsers方法的典型用法代码示例。如果您正苦于以下问题:PHP EfrontUser::getUsers方法的具体用法?PHP EfrontUser::getUsers怎么用?PHP EfrontUser::getUsers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EfrontUser
的用法示例。
在下文中一共展示了EfrontUser::getUsers方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRelatedUsers
public function getRelatedUsers()
{
$all_users = EfrontUser::getUsers();
foreach ($all_users as $value) {
if ($value['login'] == $this->user['login']) {
unset($all_users[$key]);
break;
}
}
return $all_users;
}
示例2: eF_getTableDataFlat
/**
* Emails managements
*
* This page is used to compose an email, and select its recipients
* @package eFront
* @version 1.0
*/
//This file cannot be called directly, only included.
if (str_replace(DIRECTORY_SEPARATOR, "/", __FILE__) == $_SERVER['SCRIPT_FILENAME']) {
exit;
}
$load_editor = true;
$lessons = eF_getTableDataFlat("lessons", "id,name", "", "name");
sizeof($lessons) > 0 ? $lessons = array_combine($lessons['id'], $lessons['name']) : ($lessons = array());
$smarty->assign("T_LESSONS", $lessons);
$users = EfrontUser::getUsers();
$user_types = eF_getTableDataFlat("user_types", "user_type");
sizeof($user_types) > 0 ? $custom_user_types = array_combine($user_types['user_type'], $user_types['user_type']) : ($custom_user_types = array());
$default_user_types = array("administrator" => _ADMINISTRATOR, "professor" => _PROFESSOR, "student" => _STUDENT);
$user_types = $default_user_types + $custom_user_types;
$form = new HTML_QuickForm("email_form", "post", basename($_SERVER['PHP_SELF']) . "?ctg=emails", "", null, true);
$form->registerRule('checkParameter', 'callback', 'eF_checkParameter');
$form->addElement('radio', 'recipients', null, null, 'all_users', 'selected = "selected" onclick = "eF_js_selectRecipients(\'all_users\')"');
//document.getElementById(\'lesson_recipients\').disabled = \'disabled\';document.getElementById(\'user_type_recipients\').disabled = \'disabled\';document.getElementById(\'user_recipients\').disabled = \'disabled\'"');
$form->addElement('radio', 'recipients', null, null, 'active_users', 'onclick = "eF_js_selectRecipients(\'active_users\')"');
//'onclick = "document.getElementById(\'lesson_recipients\').disabled = \'disabled\';document.getElementById(\'user_type_recipients\').disabled = \'disabled\';document.getElementById(\'user_recipients\').disabled = \'disabled\'"');
$form->addElement('radio', 'recipients', null, null, 'specific_lesson', 'onclick = "eF_js_selectRecipients(\'specific_lesson\')"');
//'onclick = "document.getElementById(\'lesson_recipients\').disabled = \'\';document.getElementById(\'user_type_recipients\').disabled = \'disabled\';document.getElementById(\'user_recipients\').disabled = \'disabled\'"');
$form->addElement('select', 'lesson', null, $lessons, 'id = "lesson_recipients" class = "inputSelect" disabled = "disabled"');
$form->addRule('lesson', _INVALIDFIELDDATA, 'checkParameter', 'id');
$form->addElement('radio', 'recipients', null, null, 'specific_type', 'onclick = "eF_js_selectRecipients(\'specific_type\')"');
示例3: eF_getTableDataFlat
if (G_VERSIONTYPE == 'enterprise') {
#cpp#ifdef ENTERPRISE
$currentEmployee = $currentUser->aspects['hcd'];
if ($currentEmployee->isSupervisor()) {
$grant_full_access = true;
}
}
#cpp#endif
if ($currentUser->getType() == "administrator") {
$grant_full_access = true;
}
if ($grant_full_access) {
$smarty->assign("T_FULL_ACCESS", 1);
$lessons = eF_getTableDataFlat("lessons", "id,name", "archive=0 and active=1", "name");
$courses = eF_getTableDataFlat("courses", "id,name", "archive=0 and active=1", "name");
$users = EfrontUser::getUsers(true);
$roles = EfrontUser::getRoles(true);
} else {
$smarty->assign("T_FULL_ACCESS", 0);
$lessons = eF_getTableDataFlat("lessons JOIN users_to_lessons", "id,name", "users_to_lessons.archive=0 and lessons.archive=0 and lessons.active=1 and lessons.id = users_to_lessons.lessons_ID AND users_LOGIN = '" . $currentUser->user['login'] . "'", "name");
$courses = eF_getTableDataFlat("courses JOIN users_to_courses", "id,name", "users_to_courses.archive=0 and courses.archive=0 and courses.active=1 and courses.id = users_to_courses.courses_ID AND users_LOGIN = '" . $currentUser->user['login'] . "'", "name");
}
//If in a branch url, remove unrelated courses
if (G_VERSIONTYPE == 'enterprise' && defined("G_BRANCH_URL") && G_BRANCH_URL) {
$branch = new EfrontBranch($_SESSION['s_current_branch']);
$result = eF_getTableDataFlat("module_hcd_course_to_branch", "courses_ID", "branches_ID=" . $branch->branch['branch_ID']);
foreach ($courses['id'] as $key => $value) {
if (!in_array($value, $result['courses_ID'])) {
unset($courses['id'][$key]);
unset($courses['name'][$key]);
}
示例4: eF_multiSort
$users = eF_multiSort($users, $sort, $order);
if (isset($_GET['filter'])) {
$users = eF_filterData($users, $_GET['filter']);
}
$smarty -> assign("T_USERS_SIZE", sizeof($users));
if (isset($_GET['limit']) && eF_checkParameter($_GET['limit'], 'int')) {
isset($_GET['offset']) && eF_checkParameter($_GET['offset'], 'int') ? $offset = $_GET['offset'] : $offset = 0;
$users = array_slice($users, $offset, $limit, true);
}
$smarty -> assign("T_USERS", $users);
$smarty -> display('administrator.tpl');
exit;
*/
$constraints = array('archive' => false) + createConstraintsFromSortedTable();
$dataSource = EfrontUser::getUsers($constraints);
$totalEntries = EfrontUser::countUsers($constraints);
$tableName = $_GET['ajax'];
$alreadySorted = 1;
$smarty->assign("T_TABLE_SIZE", $totalEntries);
include "sorted_table.php";
}
} else {
#cpp#else
$_GET['op'] = "employees";
include "module_hcd.php";
}
#cpp#endif
}