mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
export users of a group as csv file
This commit is contained in:
parent
ad9afab6e0
commit
df313d316c
|
@ -11,6 +11,7 @@
|
||||||
- new hooks SeedDMS_View_Document::[startRightColumn|extraVersionsViews|prePreviousVersionsTab|preLatestVersionTab]
|
- new hooks SeedDMS_View_Document::[startRightColumn|extraVersionsViews|prePreviousVersionsTab|preLatestVersionTab]
|
||||||
- add expiration of documents in 3 years
|
- add expiration of documents in 3 years
|
||||||
- fix setting quota when importing users
|
- fix setting quota when importing users
|
||||||
|
- export csv file of users of a group
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Changes in version 5.1.19
|
Changes in version 5.1.19
|
||||||
|
|
|
@ -26,8 +26,13 @@ class SeedDMS_Controller_UserListCsv extends SeedDMS_Controller_Common {
|
||||||
$dms = $this->params['dms'];
|
$dms = $this->params['dms'];
|
||||||
$user = $this->params['user'];
|
$user = $this->params['user'];
|
||||||
$settings = $this->params['settings'];
|
$settings = $this->params['settings'];
|
||||||
|
$group = $this->params['group'];
|
||||||
|
|
||||||
$allUsers = $dms->getAllUsers($settings->_sortUsersInList);
|
if($group) {
|
||||||
|
$allUsers = $group->getUsers();
|
||||||
|
} else {
|
||||||
|
$allUsers = $dms->getAllUsers($settings->_sortUsersInList);
|
||||||
|
}
|
||||||
$m = 0;
|
$m = 0;
|
||||||
foreach($allUsers as $u) {
|
foreach($allUsers as $u) {
|
||||||
$m = max($m, count($u->getGroups()));
|
$m = max($m, count($u->getGroups()));
|
||||||
|
|
|
@ -34,9 +34,15 @@ if (!$user->isAdmin()) {
|
||||||
UI::exitError(getMLText("admin_tools"),getMLText("access_denied"));
|
UI::exitError(getMLText("admin_tools"),getMLText("access_denied"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!empty($_GET['groupid'])) {
|
||||||
|
$group = $dms->getGroup((int) $_GET['groupid']);
|
||||||
|
} else {
|
||||||
|
$group = null;
|
||||||
|
}
|
||||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||||
$controller = Controller::factory($tmp[1], array('dms'=>$dms, 'user'=>$user));
|
$controller = Controller::factory($tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||||
|
|
||||||
|
$controller->setParam('group', $group);
|
||||||
if(!$controller->run()) {
|
if(!$controller->run()) {
|
||||||
if ($controller->getErrorMsg() != '')
|
if ($controller->getErrorMsg() != '')
|
||||||
$errormsg = $controller->getErrorMsg();
|
$errormsg = $controller->getErrorMsg();
|
||||||
|
|
|
@ -164,6 +164,7 @@ $(document).ready( function() {
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<?php
|
<?php
|
||||||
echo '<li><a href="../out/out.RemoveGroup.php?groupid='.$selgroup->getID().'"><i class="fa fa-remove"></i> '.getMLText("rm_group").'</a><li>';
|
echo '<li><a href="../out/out.RemoveGroup.php?groupid='.$selgroup->getID().'"><i class="fa fa-remove"></i> '.getMLText("rm_group").'</a><li>';
|
||||||
|
echo '<li><a href="../op/op.UserListCsv.php?groupid='.$selgroup->getID().'"><i class="fa fa-download"></i> '.getMLText("export_user_list_csv").'</a><li>';
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user