Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #684 from Leantime/sanitationFixes
fixing ldap issues
  • Loading branch information
marcelfolaron committed Apr 17, 2022
2 parents 6c97fd8 + 2e1e57e commit c204bca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/domain/ldap/services/class.ldap.php
Expand Up @@ -93,7 +93,12 @@ private function getRoleAssignments (){

public function connect() {

if(!$this->config->useLdap){
return false;
}

if(function_exists("ldap_connect")) {

$this->ldapConnection = ldap_connect($this->host, $this->port);

ldap_set_option($this->ldapConnection, LDAP_OPT_PROTOCOL_VERSION, 3) or die('Unable to set LDAP protocol version');
Expand Down
2 changes: 2 additions & 0 deletions src/domain/tickets/services/class.tickets.php
Expand Up @@ -256,6 +256,7 @@ public function quickAddMilestone($params)
'hourRemaining' => '',
'planHours' => '',
'sprint' => '',
'priority' => 3,
'dependingTicketId' =>$params['dependentMilestone'],
'acceptanceCriteria' => '',
'tags' => $params['tags'],
Expand Down Expand Up @@ -438,6 +439,7 @@ public function quickUpdateMilestone($params)
'planHours' => '',
'sprint' => '',
'acceptanceCriteria' => '',
'priority' => 3,
'dependingTicketId' => $params['dependentMilestone'],
'tags' => $params['tags'],
'editFrom' => $this->language->getISODateString($params['editFrom']),
Expand Down
4 changes: 0 additions & 4 deletions src/domain/users/controllers/class.showAll.php
Expand Up @@ -30,10 +30,6 @@ public function get()
$tpl->assign('admin', true);
$tpl->assign('roles', core\login::$userRoles);

if($ldapService->connect()) {
$ldapService->getAllMembers($_SESSION['userdata']['mail'], '');
}

$tpl->display('users.showAll');

}else{
Expand Down

0 comments on commit c204bca

Please sign in to comment.