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

issue: sendAccessLink On NULL #4828

Merged
merged 1 commit into from Apr 15, 2019

Conversation

Projects
None yet
2 participants
@JediKev
Copy link
Member

commented Apr 3, 2019

This addresses an issue where entering a collaborator's email to send ticket email access link throws a fatal error. This is due to the method that checks for tickets with the User's email equal to the email provided. This only checks for User's emails not Collaborator emails. This adds a check for Collaborator emails as well so this will not crash out.

@@ -1079,7 +1079,7 @@ function sendAccessLink($user) {
'body' => $content->getLocalBody($lang),
), $vars);
$email->send($user, Format::striptags($msg['subj']),
$email->send($user->getEmail(), Format::striptags($msg['subj']),

This comment has been minimized.

Copy link
@protich

protich Apr 3, 2019

Member

Any explanation for the change here? The type of user is important when creating message-id in class.mailer.php

This comment has been minimized.

Copy link
@JediKev

JediKev Apr 3, 2019

Author Member

$user is always an object and send() needs the email address instead otherwise you run into the error substr() expects parameter 1 to be string, object given.

This comment has been minimized.

Copy link
@protich

protich Apr 3, 2019

Member

I don't believe that's correct statement - see send function in class.mailer.php

This comment has been minimized.

Copy link
@JediKev

JediKev Apr 3, 2019

Author Member

Okay, I see what you mean. send() is supposed to return the email address. I will have to look deeper into why that error occurs.

issue: sendAccessLink On NULL
This addresses an issue where entering a collaborator's email to send ticket
email access link throws a fatal error. This is due to the method that
checks for tickets with the User's email equal to the email provided. This
only checks for User's emails not Collaborator emails. This adds a check for
Collaborator emails as well so this will not crash out.

@JediKev JediKev force-pushed the JediKev:issue/sendAccessLink-on-null branch from b67a7e0 to 6f9f2e1 Apr 4, 2019

@protich protich merged commit 431fefe into osTicket:develop Apr 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.