Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions manager/actions/user_management.static.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function menuAction(a) {
if(!empty($sqlQuery)) {
$where .= (empty($where) ? "" : " AND ") . "((mu.username LIKE '{$sqlQuery}%') OR (mua.fullname LIKE '%{$sqlQuery}%') OR (mua.email LIKE '{$sqlQuery}%'))";
}
$ds = $modx->db->select("mu.id, mu.username, rname.name AS role, mua.fullname, mua.email, ELT(mua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(mua.blocked,'{$_lang['yes']}','-') as blocked, mua.thislogin", $modx->getFullTableName('manager_users') . " AS mu
$ds = $modx->db->select("mu.id, mu.username, rname.name AS role, mua.fullname, mua.email, IF(mua.blocked,'{$_lang['yes']}','-') as blocked, mua.thislogin, mua.logincount", $modx->getFullTableName('manager_users') . " AS mu
INNER JOIN " . $modx->getFullTableName('user_attributes') . " AS mua ON mua.internalKey=mu.id
LEFT JOIN " . $modx->getFullTableName('user_roles') . " AS rname ON mua.role=rname.id", $where, 'mua.blocked ASC, mua.thislogin DESC');
include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
Expand All @@ -137,28 +137,28 @@ function menuAction(a) {
$grd->columnHeaderClass = "tableHeader";
$grd->itemClass = "tableItem";
$grd->altItemClass = "tableAltItem";
$grd->fields = "id,username,fullname,role,email,gender,blocked,thislogin";
$grd->fields = "id,username,fullname,role,email,thislogin,logincount,blocked";
$grd->columns = implode(',', array(
$_lang["icon"],
$_lang["name"],
$_lang["user_full_name"],
$_lang['role'],
$_lang["email"],
$_lang["user_gender"],
$_lang["user_block"],
$_lang["login_button"]
$_lang["user_prevlogin"],
$_lang["user_logincount"],
$_lang["user_block"]
));
$grd->colWidths = "1%,,,,,,1%,1%";
$grd->colAligns = "center,,,,,center,center,right' nowrap='nowrap";
$grd->colWidths = "1%,,,,,1%,1%,1%";
$grd->colAligns = "center,,,,,right' nowrap='nowrap,right,center";
$grd->colTypes = implode('||', array(
'template:<a class="gridRowIcon" href="javascript:;" onclick="return showContentMenu([+id+],event);" title="' . $_lang['click_to_context'] . '"><i class="' . $_style['icons_user'] . '"></i></a>',
'template:<a href="index.php?a=12&id=[+id+]" title="' . $_lang['click_to_edit_title'] . '">[+value+]</a>',
'template:[+fullname+]',
'template:[+role+]',
'template:[+email+]',
'template:[+gender+]',
'template:[+blocked+]',
'date: ' . $modx->toDateFormat('[+thislogin+]', 'formatOnly') . ' %H:%M'
'date: ' . $modx->toDateFormat('[+thislogin+]', 'formatOnly') . ' %H:%M',
'template:[+logincount+]',
'template:[+blocked+]'
));
if($listmode == '1') {
$grd->pageSize = 0;
Expand Down
13 changes: 7 additions & 6 deletions manager/actions/web_user_management.static.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function menuAction(a) {
<div class="row">
<div class="table-responsive">
<?php
$ds = $modx->db->select("wu.id, wu.username, wua.fullname, wua.email, ELT(wua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(wua.blocked,'{$_lang['yes']}','-') as 'blocked'", $modx->getFullTableName("web_users") . " wu
$ds = $modx->db->select("wu.id, wu.username, wua.fullname, wua.email, wua.lastlogin, wua.logincount, IF(wua.blocked,'{$_lang['yes']}','-') as 'blocked'", $modx->getFullTableName("web_users") . " wu
INNER JOIN " . $modx->getFullTableName("web_user_attributes") . " wua ON wua.internalKey=wu.id", ($sqlQuery ? "(wu.username LIKE '{$sqlQuery}%') OR (wua.fullname LIKE '%{$sqlQuery}%') OR (wua.email LIKE '%{$sqlQuery}%')" : ""), 'username');
include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php";
$grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items
Expand All @@ -129,11 +129,12 @@ function menuAction(a) {
$grd->columnHeaderClass = "tableHeader";
$grd->itemClass = "tableItem";
$grd->altItemClass = "tableAltItem";
$grd->fields = "id,username,fullname,email,gender,blocked";
$grd->columns = $_lang["icon"] . " ," . $_lang["name"] . " ," . $_lang["user_full_name"] . " ," . $_lang["email"] . " ," . $_lang["user_gender"] . " ," . $_lang["user_block"];
$grd->colWidths = "1%,,,,1%,1%";
$grd->colAligns = "center,,,,center,right' nowrap='nowrap";
$grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang["click_to_context"] . "'><i class='" . $_style["icons_user"] . "'></i></a>||template:<a href='index.php?a=88&id=[+id+]' title='" . $_lang["click_to_edit_title"] . "'>[+value+]</a>";
$grd->fields = "id,username,fullname,email,lastlogin,logincount,blocked";
$grd->columns = $_lang["icon"] . " ," . $_lang["name"] . " ," . $_lang["user_full_name"] . " ," . $_lang["email"] . " ," . $_lang["user_prevlogin"] . " ," . $_lang["user_logincount"] . " ," . $_lang["user_block"];
$grd->colWidths = "1%,,,,1%,1%,1%";
$grd->colAligns = "center,,,,right' nowrap='nowrap,right,center";
$grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang["click_to_context"] . "'><i class='" . $_style["icons_user"] . "'></i></a>||template:<a href='index.php?a=88&id=[+id+]' title='" . $_lang["click_to_edit_title"] . "'>[+value+]</a>||template:[+fullname+]||template:[+email+]||date: " . $modx->toDateFormat('[+thislogin+]', 'formatOnly') .
" %H:%M";
if($listmode == '1') {
$grd->pageSize = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion manager/includes/lang/english.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@
$_lang["user_full_name"] = 'Full name';
$_lang["user_gender"] = 'Gender';
$_lang["user_is_blocked"] = 'This User is blocked!';
$_lang["user_logincount"] = 'Number of logins';
$_lang["user_logincount"] = 'Login count';
$_lang["user_male"] = 'Male';
$_lang["user_management_msg"] = 'Choose the Content Manager to edit. Content Manager Users are those Users who are allowed to log into the Content Manager';
$_lang["user_management_title"] = 'Manager Users';
Expand Down