From: joshuaruesweg Date: Thu, 19 Feb 2015 15:58:17 +0000 (+0100) Subject: fix email leak in user search form X-Git-Tag: 2.1.0_RC_2~20^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=39d2c35296a2ebcf9322ba7ffeaad90511bf469e;p=GitHub%2FWoltLab%2FWCF.git fix email leak in user search form --- diff --git a/wcfsetup/install/files/lib/acp/action/UserQuickSearchAction.class.php b/wcfsetup/install/files/lib/acp/action/UserQuickSearchAction.class.php index 4d5b1e99bd..9a1c8bba6d 100644 --- a/wcfsetup/install/files/lib/acp/action/UserQuickSearchAction.class.php +++ b/wcfsetup/install/files/lib/acp/action/UserQuickSearchAction.class.php @@ -46,7 +46,7 @@ class UserQuickSearchAction extends AbstractAction { * shown columns * @var array */ - public $columns = array('email', 'registrationDate'); + public $columns = array('registrationDate', 'lastActivityTime'); /** * sort field @@ -83,6 +83,11 @@ class UserQuickSearchAction extends AbstractAction { parent::execute(); + // add email column for authorized users + if (WCF::getSession()->getPermission('admin.user.canEditMailAddress')) { + array_unshift($this->columns, 'email'); + } + switch ($this->mode) { case 'banned': $sql = "SELECT user_table.userID diff --git a/wcfsetup/install/files/lib/acp/form/UserSearchForm.class.php b/wcfsetup/install/files/lib/acp/form/UserSearchForm.class.php index 0735156f82..ade5bfea1f 100755 --- a/wcfsetup/install/files/lib/acp/form/UserSearchForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserSearchForm.class.php @@ -157,7 +157,7 @@ class UserSearchForm extends UserOptionListForm { * shown columns * @var array */ - public $columns = array('email', 'registrationDate'); + public $columns = array('registrationDate', 'lastActivityTime'); /** * number of results @@ -231,6 +231,11 @@ class UserSearchForm extends UserOptionListForm { public function readData() { parent::readData(); + // add email column for authorized users + if (WCF::getSession()->getPermission('admin.user.canEditMailAddress')) { + array_unshift($this->columns, 'email'); + } + $this->readOptionTree(); }