Skip to content
Snippets Groups Projects
Unverified Commit d0f02bbb authored by Peter Rotich's avatar Peter Rotich Committed by GitHub
Browse files

Merge pull request #13 from aydreeihn/issue/internal_forwarding

Internal Email Forwarding
parents 3af017f0 5409a953
No related branches found
No related tags found
No related merge requests found
......@@ -1365,9 +1365,17 @@ implements TemplateVariable {
) {
if (@$mid_info['userId']) {
$mailinfo['userId'] = $mid_info['userId'];
$user = User::lookupByEmail($mailinfo['email']);
if ($user && $mailinfo['userId'] != $user->getId())
$mailinfo['userId'] = $user->getId();
}
elseif (@$mid_info['staffId']) {
$mailinfo['staffId'] = $mid_info['staffId'];
$staffId = Staff::getIdByEmail($mailinfo['email']);
if ($staffId && $mailinfo['staffId'] != $staffId)
$mailinfo['staffId'] = $staffId;
}
// Capture the user type
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment