Automatically reject invitation when visitor goes to another page

This commit is contained in:
Dmitriy Simushev 2015-03-27 14:34:53 +00:00
parent 2a819b1b98
commit 59de37a12b

View File

@ -158,6 +158,13 @@ function track_visit_page($visitor_id, $page)
':now' => time(),
)
);
// If the visitor was invited and he goes to another page the invitation
// should be automatically rejected.
$invitation_state = invitation_state($visitor_id);
if ($invitation_state['invited']) {
invitation_reject($visitor_id);
}
}
}