I have implemented the mail functionality in my custom module, And it sends an email by checking certain condition. But the problem it was sending email on every time that page loads.
So i put the check in $_SESSION[‘check’] variable and made the condition according to it,
But when user logs out, This $_SESSION[‘check’] variable doesn’t get away, its still in session, And because of that when a new user logs in on certain point he doesn’t get the email about something coming from module.
So my question is how can i just easily remove that $_SESSION variable i created, So that email condition on session works fine.
Any quick fix? I know it must be easy, but its quite urgent and have no time to explore things out.
Much appreciated, Thanks!