Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #682

Merged
merged 4 commits into from Apr 16, 2022
Merged

Fixes #682

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/core/class.login.php
Expand Up @@ -275,7 +275,7 @@ private function login()
////C: update users from the identity provider

//Try Ldap
if($this->config->useLdap === true){
if($this->config->useLdap === true && extension_loaded('ldap')){

$ldap = new ldap();

Expand Down Expand Up @@ -642,7 +642,7 @@ private function getUser($username)

}

private function generateLinkAndSendEmail($username)
public function generateLinkAndSendEmail($username)
{

$permitted_chars = '0123456789abcdefghijklmnopqrstuvwxyz';
Expand Down
15 changes: 11 additions & 4 deletions src/core/class.mailer.php
Expand Up @@ -66,9 +66,9 @@ public function __construct()
$this->from = $config->email;

//PHPMailer
$this->mailAgent = new PHPMailer();
$this->mailAgent = new PHPMailer(true);

$this->mailAgent->CharSet = 'UTF-8'; //Ensure UTF-8 is used for emails
$this->mailAgent->CharSet = 'UTF-8'; //Ensure UTF-8 is used for emails

//Use SMTP or php mail().
if($config->useSMTP === true) {
Expand Down Expand Up @@ -214,8 +214,15 @@ public function sendMail(array $to, $from)
$to = array_unique($to);

foreach ($to as $recip) {
$this->mailAgent->addAddress($recip);
$this->mailAgent->send();

try {
$this->mailAgent->addAddress($recip);
$this->mailAgent->send();
}catch(Exception $e){
error_log($this->mailAgent->ErrorInfo);
error_log($e->getMessage());
}

$this->mailAgent->clearAllRecipients();
}

Expand Down
Expand Up @@ -130,7 +130,7 @@ class="fa fa-money-bill-alt"></span><?php echo $this->__('label.budgets'); ?></h
</h4>
</div>

<div class="row-fluid padding-top">
<div class="row-fluid padding-top" style="display:none;">
<div class="span8">
<div class="form-group">

Expand Down
5 changes: 5 additions & 0 deletions src/domain/tickets/controllers/class.editMilestone.php
Expand Up @@ -61,6 +61,11 @@ public function get($params)
$this->tpl->redirect(BASE_URL."/tickets/roadmap/");
}

//Ensure this ticket belongs to the current project
if($_SESSION["currentProject"] != $milestone->projectId) {
$this->projectService->changeCurrentSessionProject($milestone->projectId);
}

$comments = $this->commentsService->getComments('ticket', $params['id']);

}else{
Expand Down
4 changes: 0 additions & 4 deletions src/domain/users/controllers/class.newUser.php
Expand Up @@ -55,10 +55,6 @@ public function run()
$values['clientId'] = core\login::getUserClientId();
}

//Validation
//print_r($_POST);
# exit();

if ($values['user'] !== '') {
if ($_POST['password'] == $_POST['password2']) {
if (filter_var($values['user'], FILTER_VALIDATE_EMAIL)) {
Expand Down