TT#13262 Fix wrong condition in field_to_destination

OR-part must go into parantheses, otherwise $c->user is called
on an undefined $c if $c is not passed in.

Change-Id: Iebc07eb19ae306c61fbcfd39f35325b3c69d2bc4
changes/42/12142/1
Andreas Granig 8 years ago
parent 77fb204437
commit 096749ef4d

@ -1193,7 +1193,7 @@ sub field_to_destination {
my ($vuser, $vdomain) = split(/\@/, $v);
$vdomain = $domain unless($vdomain);
if($c && $c->user->roles eq "subscriberadmin" || $c->user->roles eq "subscriber") {
if($c && ($c->user->roles eq "subscriberadmin" || $c->user->roles eq "subscriber")) {
$vuser = NGCP::Panel::Utils::Subscriber::apply_rewrite(
c => $c, subscriber => $sub, number => $vuser, direction => 'callee_in',
);

Loading…
Cancel
Save